{"id":21887,"library":"rollup-all","title":"rollup-all","description":"Rollup-all is a build tool that wraps Rollup to automatically generate CommonJS, ES module, and browser (IIFE/UMD) bundles from a single source, with built-in Babel and TypeScript support. Current stable version is 4.0.0 (August 2025), with active development and semantic versioning. It differentiates from raw Rollup by providing an opinionated, zero-config setup that handles multiple output formats, minification, asset copying, and type definition file generation without manual configuration. Notable breaking changes occurred in v3.0.0 (format configuration restructured) and v4.0.0 (defaults moved to config root). Supports Node.js 12+ and is primarily used for library development.","status":"active","version":"1.10.6","language":"javascript","source_language":"en","source_url":"https://github.com/harrison-ifeanyichukwu/rollup-all","tags":["javascript","rollup","asset-bundling","build","generate-dist","generate-lib","esnext","typescript","library"],"install":[{"cmd":"npm install rollup-all","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-all","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-all","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core bundler dependency","package":"rollup","optional":false},{"reason":"transpilation for downleveling","package":"babel","optional":false},{"reason":"TypeScript support requires it as peer dependency","package":"typescript","optional":true}],"imports":[{"note":"config is a named export, not default. ESM since v3.","wrong":"import rollupAll from 'rollup-all'","symbol":"config","correct":"import { config } from 'rollup-all'"},{"note":"CJS still works via require, but named destructuring is the modern pattern.","wrong":"const rollupAll = require('rollup-all')","symbol":"rollupAll","correct":"import * as rollupAll from 'rollup-all'"},{"note":"ConfigOptions is a TypeScript type export, not a value. Use 'import type' or 'import { type ConfigOptions }'.","wrong":"import { ConfigOptions } from 'rollup-all'","symbol":"types (ConfigOptions)","correct":"import type { ConfigOptions } from 'rollup-all'"}],"quickstart":{"code":"npm install --save-dev rollup-all\n\n// package.json\n{\n  \"scripts\": {\n    \"build\": \"rollup-all\"\n  }\n}\n\n// rollup.config.js (optional)\nconst { config } = require('rollup-all');\n\nmodule.exports = config({\n  config: {\n    sourcemap: true,\n    uglify: true,\n    assets: ['assets/**'],\n    distConfig: { enabled: true }\n  },\n  babelConfig: {\n    presets: [['@babel/preset-env', { targets: '> 0.25%' }]],\n    plugins: ['@babel/plugin-proposal-optional-chaining']\n  }\n});\n\n// Then run: npm run build","lang":"typescript","description":"Covers installation, npm script setup, and optional configuration with config() function including babel presets and build options."},"warnings":[{"fix":"Move any options previously under config.defaults to the root of the config object.","message":"In v4.0.0, config.defaults is removed and must be placed at config root level.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Update your rollup.config.js to use the new format enablement structure: e.g., config({ distConfig: { enabled: true } }) instead of previous format.","message":"In v3.0.0, the way build formats are enabled changed. It now uses a format-specific configuration object.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Install @babel/core, @babel/preset-env, @babel/preset-typescript, @babel/runtime, and @babel/plugin-transform-runtime as devDependencies.","message":"The package requires certain Babel presets and plugins to be installed as peer dependencies. Missing them causes build failures.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure 'typescript' is in your devDependencies.","message":"TypeScript projects must have typescript installed as a devDependency. Rollup-all does not include it automatically.","severity":"gotcha","affected_versions":"*"},{"fix":"Use 'minified: true' instead of 'uglify: true' in the config object.","message":"The 'uglify' option is deprecated in favor of 'minified'.","severity":"deprecated","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install --save-dev rollup","cause":"Rollup is a peer dependency not installed.","error":"Error: Cannot find module 'rollup'"},{"fix":"Use 'import { config } from 'rollup-all'' or 'const { config } = require('rollup-all')'.","cause":"Using default import instead of named import for 'config'.","error":"TypeError: config is not a function"},{"fix":"Ensure a rollup.config.js file exists at project root, or run rollup-all with explicit config path.","cause":"Missing configuration file or incorrect file name.","error":"Error: No configuration found. Create a rollup.config.js file or use --config flag."},{"fix":"Install @types/node and ensure tsconfig includes 'moduleResolution': 'node' and 'allowSyntheticDefaultImports': true.","cause":"Using CommonJS require in a TypeScript file without node types.","error":"src/index.ts(1,1): error TS2304: Cannot find name 'require'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}