Babel plugin (v2.0.0) that transforms glob-based import paths (e.g., `import * as Features from './features/*.js'`) into explicit per-module imports at build time. Designed to solve the problem of dynamically discovering modules in a directory while ensuring webpack bundles them correctly for client-side applications. Uses node-glob for path resolution. Not actively maintained (last release 2017). Key differentiator: enables automatic module registration without runtime dynamic imports, avoiding webpack dead-code elimination. Alternatives include `babel-plugin-wildcard` or manual `require.context` with webpack.
npm install babel-plugin-bulk-importNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures .babelrc, creates a module with CJS export, and uses wildcard import to collect all modules from a directory.
Ensure the glob pattern directly matches files, not directories. Use `**/*.js` for recursion but verify file structure.
Consider alternative plugins like babel-plugin-wildcard or use webpack's require.context.
Avoid wildcard imports from node_modules; they cause unexpected nesting and potential bundle bloat.
Install glob: npm install glob --save-dev or --save
Ensure babel-plugin-bulk-import is added to the plugins list in .babelrc.
Ensure the webpack config processes the file with Babel (e.g., use babel-loader) and the plugin is configured.