A Browserify transform that applies Rollup to convert ES6/ES2015 modules into a single CommonJS module, enabling tree-shaking and scope-hoisting for smaller bundles. The current stable version is 0.5.1. This package is unmaintained and considered a legacy hack for migrating from Browserify to Rollup; most users should instead use Rollup directly with rollup-plugin-commonjs and rollup-plugin-node-resolve. Its key differentiator is seamless integration with the Browserify pipeline, applying Rollup before other transforms like babelify. However, it only works on ES6 import/export statements, leaving require() calls untouched. Sourcemap support requires --debug flag.
npm install rollupifyVerified import paths — ran on the pinned version, not inferred.
Basic usage of rollupify with Browserify command line to transform ES6 modules into a bundled CommonJS output.
Migrate to a pure Rollup setup with rollup-plugin-commonjs and rollup-plugin-node-resolve.
Convert all require() calls to import/export if you want them bundled.
Specify transforms in order: rollupify then babelify.
Pass --debug or {debug: true} to Browserify.Use a rollup.config.js file or pass config object directly.
Ensure all files are ES6 modules; convert require() calls to import/export.
Check that the config file path is correct relative to the current working directory.
Ensure rollupify is listed before other transforms and that files use import/export.