{"id":21010,"library":"broccoli-rollup","title":"broccoli-rollup","description":"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.","status":"active","version":"5.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/chadhietala/broccoli-rollup","tags":["javascript","broccoli","broccoli plugin","rollup","typescript"],"install":[{"cmd":"npm install broccoli-rollup","lang":"bash","label":"npm"},{"cmd":"yarn add broccoli-rollup","lang":"bash","label":"yarn"},{"cmd":"pnpm add broccoli-rollup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides the Broccoli plugin base class for implementing the plugin interface.","package":"broccoli-plugin","optional":false},{"reason":"The bundler used to process input files.","package":"rollup","optional":false}],"imports":[{"note":"Since v5, this package is ESM-only and provides a default export. Use of require() will fail.","wrong":"const rollup = require('broccoli-rollup');","symbol":"default","correct":"import rollup from 'broccoli-rollup';"},{"note":"TypeScript users should import the options type from the 'rollup' package, not from this package.","wrong":"","symbol":"RollupOptions","correct":"import type { RollupOptions } from 'rollup';"},{"note":"PluginOptions is exported for TypeScript users who need to configure the plugin wrapper.","wrong":"","symbol":"PluginOptions","correct":"import type { PluginOptions } from 'broccoli-rollup';"}],"quickstart":{"code":"import rollup from 'broccoli-rollup';\n\nexport default () =>\n  rollup('lib', {\n    rollup: {\n      input: 'index.js',\n      output: {\n        file: 'bundle.js',\n        format: 'es',\n      },\n    },\n  });","lang":"typescript","description":"Shows basic usage: import the default export, call with input directory and Rollup configuration."},"warnings":[{"fix":"Upgrade Node to >=12 or stay on v4.x (but v4 is unmaintained).","message":"Dropped support for Node < 12 in v5.","severity":"breaking","affected_versions":"<5.0.0"},{"fix":"Use import syntax or downgrade to v4.x if CJS is required.","message":"v5 is ESM-only; CJS require() will throw.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Set nodeModulesPath explicitly if your node_modules is not at cwd.","message":"nodeModulesPath defaults to process.cwd() but is overridden by an internal symlink.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Avoid onwrite; use broccoli output directly instead.","message":"The 'rollup' plugin wrapper configuration cannot use rollup's onwrite hook due to Broccoli's immutable input.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install: npm install --save-dev broccoli-rollup / Use ESM import, not require().","cause":"Package not installed or wrong import style.","error":"Cannot find module 'broccoli-rollup'"},{"fix":"Use a path relative to the broccoli input directory (e.g., 'index.js').","cause":"Providing an absolute path for rollup.input instead of a relative one.","error":"Error: rollup input must be relative to inputPath"},{"fix":"Switch to import syntax or downgrade to v4.x.","cause":"Using require() on an ESM-only package.","error":"TypeError: (0 , ...) is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}