esbuild-plugin-import-glob
esbuild-plugin-import-glob copied to clipboard
Import syntax not working
Hey there! Thanks a lot for this plugin!
I am trying to use it with an import syntax like that :
import ImportGlobPlugin from 'esbuild-plugin-import-glob';
await esbuild.build( {
entryPoints: [ './main.js' ],
bundle: true,
outfile: './scripts.js',
plugins: [
ImportGlobPlugin(),
],
} );
But I get this error:
TypeError: ImportGlobPlugin is not a function
Is there anything I can do?
Thank you very much for your help!
This worked in my case:
import ImportGlobPlugin from "esbuild-plugin-import-glob";
const ImportGlob = ImportGlobPlugin.default
await esbuild.build({
plugins: [ImportGlob()],
// ...
})