Webpack loader that wraps modules in a require.ensure block to create separate chunks for lazy loading. Version 0.5.6 is the current stable release; last updated February 2018. Key differentiator: simple callback-based API for loading code-split bundles on demand, with options for lazy loading and custom chunk naming. Unlike dynamic import(), it uses webpack's legacy require.ensure and is best suited for webpack 1–3 projects. No longer actively maintained; users should migrate to webpack's built-in dynamic import or @loadable-component.
npm install bundle-loaderVerified import paths — ran on the pinned version, not inferred.
Shows how to set up bundle-loader in webpack config and use it to lazy load a module only on user click.
Replace bundle-loader usage with dynamic import() and webpack's magic comments.
Set output.chunkFilename in webpack config (e.g., '[name].[id].js') and use the name option to control chunk naming.
Use [name] in the name option to set a custom name; add hash via output.chunkFilename instead.
Use module.rules array with use/loader property.
Consider migrating to dynamic import() or a modern code-splitting library like @loadable/component.
Ensure the loader is applied to the correct file pattern and consider upgrading to dynamic import(). For webpack 4, use output.enabledChunkLoadingTypes or migrate.
Run 'npm install bundle-loader --save-dev' and ensure webpack is configured to resolve node_modules loaders.
Use webpack 4 or migrate to dynamic import(). This is a compatibility issue.