{"id":22322,"library":"rollupify","title":"rollupify","description":"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.","status":"deprecated","version":"0.5.1","language":"javascript","source_language":"en","source_url":"https://github.com/nolanlawson/rollupify","tags":["javascript","rollup","browserify"],"install":[{"cmd":"npm install rollupify","lang":"bash","label":"npm"},{"cmd":"yarn add rollupify","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollupify","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; rollupify wraps Rollup's bundling","package":"rollup","optional":true},{"reason":"transform is designed for Browserify pipeline; required at runtime","package":"browserify"}],"imports":[{"note":"CJS-only; no ESM exports. Use require() to load the transform.","wrong":"import rollupify from 'rollupify'","symbol":"default","correct":"const rollupify = require('rollupify')"},{"note":"Second argument may include rollup config options; empty object is valid.","wrong":"b.transform('rollupify', {})","symbol":"transform","correct":"b.transform('rollupify', { config: { ... } })"},{"note":"Must be under browserify key in package.json, not top-level.","wrong":"\"transform\": [\"rollupify\"]","symbol":"package.json transform","correct":"\"browserify\": { \"transform\": [\"rollupify\"] }"}],"quickstart":{"code":"// Install\nnpm install rollupify\n\n// index.js\nimport hello from './hello';\nconsole.log(hello);\nexport default hello;\n\n// hello.js\nexport default \"hello world\";\n\n// Command line\nbrowserify -t rollupify index.js > output.js\n\n// Or with custom rollup.config.js\n// browserify -t [ rollupify --config rollup.config.js ] index.js > output.js","lang":"javascript","description":"Basic usage of rollupify with Browserify command line to transform ES6 modules into a bundled CommonJS output."},"warnings":[{"fix":"Migrate to a pure Rollup setup with rollup-plugin-commonjs and rollup-plugin-node-resolve.","message":"Package is marked as unmaintained and no longer actively developed.","severity":"deprecated","affected_versions":">=0.1"},{"fix":"Convert all require() calls to import/export if you want them bundled.","message":"Works only on ES6 import/export statements. require() calls are left untouched.","severity":"breaking","affected_versions":">=0.1"},{"fix":"Specify transforms in order: rollupify then babelify.","message":"When using with babelify, rollupify must be applied first.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Pass --debug or {debug: true} to Browserify.","message":"Sourcemaps require --debug flag in Browserify.","severity":"gotcha","affected_versions":">=0.1"},{"fix":"Use a rollup.config.js file or pass config object directly.","message":"Config must be passed as --config for CLI or as options object programmatically; not via a separate config file reference.","severity":"breaking","affected_versions":">=0.1"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure all files are ES6 modules; convert require() calls to import/export.","cause":"rollupify encountered a file it couldn't parse, possibly due to unsupported syntax like require() or non-ES6 module.","error":"TypeError: Cannot read property 'code' of undefined"},{"fix":"Check that the config file path is correct relative to the current working directory.","cause":"The --config path is incorrect or the file does not exist.","error":"Error: Config file not found: rollup.config.js"},{"fix":"Ensure rollupify is listed before other transforms and that files use import/export.","cause":"rollupify did not process the file; possible transform order issue or file is not an ES6 module.","error":"Bundle contains require() calls - rollupify not applied"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}