{"id":20805,"library":"webpack-parallel-uglify-plugin","title":"webpack-parallel-uglify-plugin","description":"A webpack plugin that runs UglifyJS (or Terser) in parallel across multiple workers to speed up minification of bundled assets. Version 2.0.0 is the current stable release, but the project appears to be in maintenance mode with no recent updates (last release 2019). It leverages Node.js worker threads to distribute minification of each output file across available CPU cores, offering significant build time reductions for projects with many entry points. Compared to built-in webpack UglifyJS plugin, it can reduce minification time from minutes to seconds. Supports both UglifyJS (ES5) and Terser (ES6+), along with caching, file inclusion/exclusion by pattern, and source maps. Requires webpack as a peer dependency.","status":"maintenance","version":"2.0.0","language":"javascript","source_language":"en","source_url":"git://github.com/gdborton/webpack-parallel-uglify-plugin","tags":["javascript","compress","compressor","min","minification","minifier","minify","optimize","optimizer"],"install":[{"cmd":"npm install webpack-parallel-uglify-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-parallel-uglify-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-parallel-uglify-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin only works with webpack builds","package":"webpack","optional":false}],"imports":[{"note":"ESM default import is correct; CommonJS require works but may have issues with default export","wrong":"const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')","symbol":"default","correct":"import ParallelUglifyPlugin from 'webpack-parallel-uglify-plugin'"},{"note":"If using CommonJS, the default export is under .default property","wrong":"const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')","symbol":"ParallelUglifyPlugin","correct":"const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin').default"},{"note":"Named import does not exist; only default export","wrong":"import { ParallelUglifyPlugin } from 'webpack-parallel-uglify-plugin'","symbol":"ParallelUglifyPlugin","correct":"import { default as ParallelUglifyPlugin } from 'webpack-parallel-uglify-plugin'"}],"quickstart":{"code":"// webpack.config.js\nimport ParallelUglifyPlugin from 'webpack-parallel-uglify-plugin';\n\nexport default {\n  entry: './src/index.js',\n  output: {\n    filename: 'bundle.js',\n    path: '/dist',\n  },\n  plugins: [\n    new ParallelUglifyPlugin({\n      workerCount: 4,\n      uglifyJS: {\n        output: {\n          beautify: false,\n        },\n        compress: {\n          drop_console: true,\n        },\n      },\n      cacheDir: '/path/to/cache',\n      sourceMap: false,\n      include: /\\.js$/,\n      exclude: /node_modules/,\n      test: /\\.js$/,\n    }),\n  ],\n};","lang":"javascript","description":"Shows how to configure the plugin with UglifyJS options, caching, and worker count."},"warnings":[{"fix":"Replace with 'terser-webpack-plugin' and update configuration accordingly.","message":"The package is outdated and unmaintained; consider using 'terser-webpack-plugin' which is officially maintained by the webpack team.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Choose only one minifier: either UglifyJS or Terser.","message":"Cannot use both 'uglifyJS' and 'terser' options simultaneously. If both are provided, the plugin will throw an error.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Set terser options instead of uglifyJS if your code uses ES6+.","message":"With UglifyJS (not Terser), ES6+ syntax will cause an error because UglifyJS only supports ES5. Use terser option for ES6+.","severity":"gotcha","affected_versions":">=1.0.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 webpack-parallel-uglify-plugin --save-dev' and ensure correct import statement.","cause":"Package not installed or import path incorrect.","error":"Error: Cannot find module 'webpack-parallel-uglify-plugin'"},{"fix":"Use 'const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin').default;'","cause":"Using CommonJS require without accessing .default property.","error":"TypeError: ParallelUglifyPlugin is not a constructor"},{"fix":"Remove one of the options: either uglifyJS or terser.","cause":"Both minifier options provided simultaneously.","error":"Error: ParallelUglifyPlugin: you cannot use both uglifyJS and terser"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}