Registry / devops / rollupify

rollupify

JSON →
library0.5.1jsnpmunverified

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 rollupify
INSTALL
IMPORT
SIG · ROLLUPIFY
R
rollupify
devopsjavascriptv0.5.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const rollupify = require('rollupify')
import rollupify from 'rollupify'
CJS-only; no ESM exports. Use require() to load the transform.
transform
b.transform('rollupify', { config: { ... } })
b.transform('rollupify', {})
Second argument may include rollup config options; empty object is valid.
package.json transform
"browserify": { "transform": ["rollupify"] }
"transform": ["rollupify"]
Must be under browserify key in package.json, not top-level.

Basic usage of rollupify with Browserify command line to transform ES6 modules into a bundled CommonJS output.

// Install npm install rollupify // index.js import hello from './hello'; console.log(hello); export default hello; // hello.js export default "hello world"; // Command line browserify -t rollupify index.js > output.js // Or with custom rollup.config.js // browserify -t [ rollupify --config rollup.config.js ] index.js > output.js
Debug
Known issues
deprecatedPackage is marked as unmaintained and no longer actively developed.
fix
Migrate to a pure Rollup setup with rollup-plugin-commonjs and rollup-plugin-node-resolve.
affects: >=0.1
breakingWorks only on ES6 import/export statements. require() calls are left untouched.
fix
Convert all require() calls to import/export if you want them bundled.
affects: >=0.1
gotchaWhen using with babelify, rollupify must be applied first.
fix
Specify transforms in order: rollupify then babelify.
affects: >=0.1
gotchaSourcemaps require --debug flag in Browserify.
fix
Pass --debug or {debug: true} to Browserify.
affects: >=0.1
breakingConfig must be passed as --config for CLI or as options object programmatically; not via a separate config file reference.
fix
Use a rollup.config.js file or pass config object directly.
affects: >=0.1
Errors
Common errors & fixes
TypeError: Cannot read property 'code' of undefined
rollupify encountered a file it couldn't parse, possibly due to unsupported syntax like require() or non-ES6 module.
fix
Ensure all files are ES6 modules; convert require() calls to import/export.
Error: Config file not found: rollup.config.js
The --config path is incorrect or the file does not exist.
fix
Check that the config file path is correct relative to the current working directory.
Bundle contains require() calls - rollupify not applied
rollupify did not process the file; possible transform order issue or file is not an ES6 module.
fix
Ensure rollupify is listed before other transforms and that files use import/export.
Upgrade
Version history
0.5.1latest on npm
Audit
Dependencies
rollupoptionalpeer dependency; rollupify wraps Rollup's bundling
browserifyrequiredtransform is designed for Browserify pipeline; required at runtime
Agent activity
2 hits · last 30 days
node
2
Resources
rollupify — npm install rollupify · libregistry