Registry / devops / broccoli-rollup

broccoli-rollup

JSON →
library5.0.0jsnpmunverified

A Broccoli plugin that bundles input files using Rollup.js. This is a stable v5 release (2022) with TypeScript definitions. It supports basic bundling, code splitting, and multiple outputs. Key differentiators: it preserves Broccoli's immutable input model by using a cache directory and symlinks node_modules, ensuring compatibility with Rollup's CLI features. Alternatives like ember-auto-import are Ember-specific; this is a generic Broccoli plugin.

npm install broccoli-rollup
INSTALL
IMPORT
SIG · BROCCOLI-ROLLUP
B
broccoli-rollup
devopsjavascriptv5.0.0
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
import rollup from 'broccoli-rollup';
const rollup = require('broccoli-rollup');
Since v5, this package is ESM-only and provides a default export. Use of require() will fail.
RollupOptions
import type { RollupOptions } from 'rollup';
TypeScript users should import the options type from the 'rollup' package, not from this package.
PluginOptions
import type { PluginOptions } from 'broccoli-rollup';
PluginOptions is exported for TypeScript users who need to configure the plugin wrapper.

Shows basic usage: import the default export, call with input directory and Rollup configuration.

import rollup from 'broccoli-rollup'; export default () => rollup('lib', { rollup: { input: 'index.js', output: { file: 'bundle.js', format: 'es', }, }, });
Debug
Known issues
breakingDropped support for Node < 12 in v5.
fix
Upgrade Node to >=12 or stay on v4.x (but v4 is unmaintained).
affects: <5.0.0
breakingv5 is ESM-only; CJS require() will throw.
fix
Use import syntax or downgrade to v4.x if CJS is required.
affects: >=5.0.0
gotchanodeModulesPath defaults to process.cwd() but is overridden by an internal symlink.
fix
Set nodeModulesPath explicitly if your node_modules is not at cwd.
affects: >=2.0.0
deprecatedThe 'rollup' plugin wrapper configuration cannot use rollup's onwrite hook due to Broccoli's immutable input.
fix
Avoid onwrite; use broccoli output directly instead.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'broccoli-rollup'
Package not installed or wrong import style.
fix
Install: npm install --save-dev broccoli-rollup / Use ESM import, not require().
Error: rollup input must be relative to inputPath
Providing an absolute path for rollup.input instead of a relative one.
fix
Use a path relative to the broccoli input directory (e.g., 'index.js').
TypeError: (0 , ...) is not a function
Using require() on an ESM-only package.
fix
Switch to import syntax or downgrade to v4.x.
Upgrade
Version history
5.0.0latest on npm
Audit
Dependencies
broccoli-pluginrequiredProvides the Broccoli plugin base class for implementing the plugin interface.
rolluprequiredThe bundler used to process input files.
Agent activity
13 hits · last 30 days
node
10
Resources
broccoli-rollup — npm install broccoli-rollup · libregistry