{"id":20261,"library":"parallel-webpack","title":"parallel-webpack","description":"Build multiple webpack configurations in parallel using all CPU cores. Current stable version is 2.6.0 (released 2020), with an alpha 3.0.0 that drops watch mode and switches from worker-farm to jest-worker. Reduces build times dramatically (e.g., from 16 min to 2 min for 32 variants). Key differentiator: built-in createVariants helper for generating configuration combinations without manual config arrays.","status":"active","version":"2.6.0","language":"javascript","source_language":"en","source_url":"https://github.com/trivago/parallel-webpack","tags":["javascript","webpack","parallel"],"install":[{"cmd":"npm install parallel-webpack","lang":"bash","label":"npm"},{"cmd":"yarn add parallel-webpack","lang":"bash","label":"yarn"},{"cmd":"pnpm add parallel-webpack","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency on webpack versions 1, 2, 3, or 4.","package":"webpack","optional":false}],"imports":[{"note":"Package supports both ESM and CJS; CJS require works but named import is preferred for modern code.","wrong":"const createVariants = require('parallel-webpack').createVariants;","symbol":"createVariants","correct":"import { createVariants } from 'parallel-webpack'"},{"note":"Primary usage is via CLI; programmatic API is minimal.","wrong":"require('parallel-webpack')()","symbol":"default (run CLI)","correct":"parallel-webpack (CLI command)"},{"note":"Undocumented but available in source; use only if you need programmatic control.","symbol":"run (programmatic)","correct":"const { run } = require('parallel-webpack'); run(configs, options);"}],"quickstart":{"code":"// webpack.config.js\nvar path = require('path');\nmodule.exports = [{\n  entry: './pageA.js',\n  output: {\n    path: path.resolve(__dirname, './dist'),\n    filename: 'pageA.bundle.js'\n  }\n}, {\n  entry: './pageB.js',\n  output: {\n    path: path.resolve(__dirname, './dist'),\n    filename: 'pageB.bundle.js'\n  }\n}];\n\n// CLI: npx parallel-webpack --config webpack.config.js","lang":"javascript","description":"Demonstrates basic usage: exporting an array of configs and running via CLI to build in parallel."},"warnings":[{"fix":"Stay on v2.6.0 or implement custom watch logic.","message":"v3.0.0-alpha.1 drops watch mode support; use v2.6.x if you need --watch.","severity":"breaking","affected_versions":">=3.0.0-alpha.1"},{"fix":"Test with your config; upgrade only after validating behavior.","message":"v3.0.0-alpha.1 changes worker-farm to jest-worker; may affect error handling and output.","severity":"breaking","affected_versions":">=3.0.0-alpha.1"},{"fix":"Use webpack 4 or test with webpack 5 at your own risk.","message":"Webpack 4 support is stable but Webpack 5 is not officially supported.","severity":"deprecated","affected_versions":">=2.6.0"},{"fix":"Update to v2.5.0+ or export a static array.","message":"Config function that returns a promise of config array is only supported since v2.5.0.","severity":"gotcha","affected_versions":"<2.5.0"},{"fix":"Update to v2.6.0+; older versions may hang.","message":"Worker processes may not exit cleanly on error; unhandled rejections cause build failure since v2.6.0.","severity":"gotcha","affected_versions":"<2.6.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install parallel-webpack --save-dev` and use `npx parallel-webpack`.","cause":"Local install missing or global install not in PATH.","error":"Error: Cannot find module 'parallel-webpack'"},{"fix":"Install webpack 4: `npm install webpack@4 --save-dev`.","cause":"Webpack 5 is not in the peer dependency range.","error":"Error: webpack version mismatch; expected ^1.12.9 || ^2.2.0 || ^3.x || ^4.x but found 5.x"},{"fix":"Use `const { createVariants } = require('parallel-webpack');`","cause":"Using `require('parallel-webpack')` directly; createVariants is a named export.","error":"TypeError: createVariants is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}