rollup-loader

raw JSON →
0.3.0 verified Mon Apr 27 auth: no javascript maintenance

A webpack loader that integrates Rollup into the webpack build pipeline. Version 0.3.0 (latest) allows using Rollup to process JavaScript files before webpack finishes bundling. It accepts custom Rollup plugins and passes the processed result and sourcemaps back to webpack. Useful for leveraging Rollup's tree-shaking and ES module handling within a webpack workflow. No recent updates; appears stable but not actively developed.

error Module not found: Error: Can't resolve 'rollup-plugin-memory' in '...'
cause Missing peer dependency rollup-plugin-memory.
fix
npm install rollup-plugin-memory --save-dev
breaking rollup-loader depends on rollup-plugin-memory which may have breaking changes.
fix Pin rollup-plugin-memory version or check compatibility.
npm install rollup-loader
yarn add rollup-loader
pnpm add rollup-loader

Shows how to configure webpack to use rollup-loader for .js files, passing rollup plugins via options.

// webpack.config.js
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        loader: 'rollup-loader',
        options: {
          plugins: [] // Add rollup plugins here
        }
      }
    ]
  }
};