A Webpack loader that delegates module bundling to Rollup while using Webpack's own module resolution. Version 0.8.1 is the latest stable release, with no active development since 2020. It requires both webpack >=3.3.0 and rollup ^1.0.0 || ^2.0.0. Key differentiator: combines Rollup's tree-shaking and ES module optimizations with Webpack's plugin ecosystem and code splitting. Best suited for project entry points where Rollup's bundling is desired but full migration is impractical. Not for general .js files due to recursive bundling issues.
npm install webpack-rollup-loaderVerified import paths — ran on the pinned version, not inferred.
Configures Webpack to use webpack-rollup-loader on the entry file only, with Rollup options and Babel for other JS files.
Use test: /entry\.js$/ or similar to target only the entry point.
In Babel config, disable @babel/plugin-transform-modules-commonjs or set modules: false.
Consider alternative loaders like rollup-loader or migrate fully to Rollup or Webpack 5 native features.
Restrict the loader to the entry module only using test: /entry\.js$/.
Set modules: false in Babel config for files processed by Rollup.