{"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,"search_vec":"'16':45 '2':48 '2.6.0':18 '2020':20 '3.0.0':24 '32':51 'alpha':23 'array':67 'build':4,40 'built':56 'built-in':55 'combin':63 'config':66 'configur':7,62 'core':13 'cpu':12 'createvari':58 'current':14 'differenti':54 'dramat':42 'drop':26 'e.g':43 'farm':34 'generat':61 'helper':59 'javascript':68 'jest':37 'jest-work':36 'key':53 'manual':65 'min':46,49 'mode':28 'multipl':5 'parallel':2,9,70 'parallel-webpack':1 'reduc':39 'releas':19 'stabl':15 'switch':30 'time':41 'use':10 'variant':52 'version':16 'watch':27 'webpack':3,6,69 'without':64 'worker':33,38 'worker-farm':32","created_at":"2026-04-25T11:22:10.600733+00:00","updated_at":"2026-04-25T11:22:10.600733+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"parallel-webpack","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/trivago/parallel-webpack","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/parallel-webpack","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}