{"id":21321,"library":"fancy-rollup","title":"fancy-rollup","description":"fancy-rollup is a multi-process wrapper for Rollup that runs multiple Rollup builds concurrently across CPU cores to speed up bundling. Version 0.5.5 (latest stable) targets Node >=8 and is published on npm. It reads an array of Rollup configurations from rollup.config.js and spawns separate Node processes for each build, providing several reporter styles (interactive, list, silent, etc.) for progress visualization. Unlike Rollup's sequential multi-bundle support, fancy-rollup parallelizes builds out of the box with options for concurrency limits and target selection. The package is in early development (minor version 0.x), with API support still planned. It has no runtime peer dependencies but relies on a compatible rollup installation.","status":"maintenance","version":"0.5.5","language":"javascript","source_language":"en","source_url":"https://github.com/timdp/fancy-rollup","tags":["javascript"],"install":[{"cmd":"npm install fancy-rollup","lang":"bash","label":"npm"},{"cmd":"yarn add fancy-rollup","lang":"bash","label":"yarn"},{"cmd":"pnpm add fancy-rollup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"fancy-rollup wraps Rollup; it uses the installed rollup package to perform bundling in child processes. If rollup is not found, it falls back to its own bundled version (0.x).","package":"rollup","optional":false}],"imports":[{"note":"fancy-rollup is primarily CLI-based; programmatic API is planned but not yet available. The import shown is for potential future use; currently the package does not export a usable JavaScript API.","wrong":"const fancyRollup = require('fancy-rollup'); // CJS works (package supports require)","symbol":"fancy-rollup","correct":"import fancyRollup from 'fancy-rollup'; // ESM (package has no default ESM export, but Node can transpile)"},{"note":"The main usage is via command line. No programmatic API exposed in v0.5.5.","wrong":"require('fancy-rollup')(); // No such function exported","symbol":"cli","correct":"npx fancy-rollup"},{"note":"fancy-rollup expects rollup.config.js to export an array of Rollup configs; a single object will fail silently or cause errors.","wrong":"module.exports = { input: 'src/main.js', output: { file: 'dist/bundle.js', format: 'esm' } }; // Must be an array for fancy-rollup","symbol":"config","correct":"module.exports = [{ input: 'src/main.js', output: { file: 'dist/bundle.js', format: 'esm' } }]; // rollup.config.js array"}],"quickstart":{"code":"// Install fancy-rollup as dev dependency\n// npm install --save-dev fancy-rollup rollup@^2\n\n// Create rollup.config.js:\nmodule.exports = [\n  {\n    input: 'src/index.js',\n    output: { file: 'dist/index.cjs.js', format: 'cjs' }\n  },\n  {\n    input: 'src/index.js',\n    output: { file: 'dist/index.esm.js', format: 'esm' }\n  }\n];\n\n// Run fancy-rollup:\n// npx fancy-rollup\n// or add to package.json scripts: \"build\": \"fancy-rollup\"\n\n// Advance usage with options:\n// npx fancy-rollup -c rollup.config.js -t esm -r interactive -p 2","lang":"javascript","description":"Installation, configuration with an array of Rollup configs, and CLI usage. Shows concurrency and reporter options."},"warnings":[{"fix":"Consider using Rollup's built-in parallelization via --watch or other build tools like esbuild or webpack.","message":"fancy-rollup has not seen updates since 2018. Rolling updates and bug fixes are unlikely.","severity":"deprecated","affected_versions":"all"},{"fix":"Always export an array of configuration objects: module.exports = [config1, config2];","message":"Rollup configuration must be an array; a single object will be treated as an array of one element? Actually fancy-rollup expects array, but Rollup itself accepts both. If you export a single object, fancy-rollup will likely fail or behave unexpectedly.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure only one compatible version (e.g., rollup@^2) is installed in the project's node_modules.","message":"The package uses child_process.fork and Node's module resolution to find rollup. If you have multiple versions of rollup in node_modules, it may pick the wrong one.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use -p option to limit concurrency: fancy-rollup -p 2","message":"Concurrency default is number of CPU cores. On machines with limited resources, this may cause memory exhaustion or slowdowns.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Explicitly set reporter with -r option if you need non-interactive output in CI.","message":"Reporter options: 'interactive' requires TTY; in non-TTY environments it falls back to 'dumb' but this may not be obvious.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install rollup as a dev dependency: npm install --save-dev rollup","cause":"fancy-rollup cannot locate the rollup package. It searches up the directory tree but fails if no compatible rollup is installed.","error":"Error: Cannot find module 'rollup'"},{"fix":"Change module.exports = { ... } to module.exports = [{ ... }]","cause":"fancy-rollup expects rollup.config.js to export an array of configuration objects, but a single object was exported.","error":"TypeError: Config must be an array"},{"fix":"Check that Node.js is installed and the user has permission to spawn processes. Reduce concurrency with -p flag.","cause":"Possible permission issues, missing Node.js executable, or system limitation (e.g., max processes reached).","error":"Error: Failed to spawn child process"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}