Registry / devops / webpack-parallel-uglify-plugin

webpack-parallel-uglify-plugin

JSON →
library2.0.0jsnpmunverified

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.

npm install webpack-parallel-uglify-plugin
INSTALL
IMPORT
SIG · WEBPACK-PARALLEL-U
W
webpack-parallel-uglify-plugin
devopsjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import ParallelUglifyPlugin from 'webpack-parallel-uglify-plugin'
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')
ESM default import is correct; CommonJS require works but may have issues with default export
ParallelUglifyPlugin
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin').default
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')
If using CommonJS, the default export is under .default property
ParallelUglifyPlugin
import { default as ParallelUglifyPlugin } from 'webpack-parallel-uglify-plugin'
import { ParallelUglifyPlugin } from 'webpack-parallel-uglify-plugin'
Named import does not exist; only default export

Shows how to configure the plugin with UglifyJS options, caching, and worker count.

// webpack.config.js import ParallelUglifyPlugin from 'webpack-parallel-uglify-plugin'; export default { entry: './src/index.js', output: { filename: 'bundle.js', path: '/dist', }, plugins: [ new ParallelUglifyPlugin({ workerCount: 4, uglifyJS: { output: { beautify: false, }, compress: { drop_console: true, }, }, cacheDir: '/path/to/cache', sourceMap: false, include: /\.js$/, exclude: /node_modules/, test: /\.js$/, }), ], };
Debug
Known issues
deprecatedThe package is outdated and unmaintained; consider using 'terser-webpack-plugin' which is officially maintained by the webpack team.
fix
Replace with 'terser-webpack-plugin' and update configuration accordingly.
affects: >=0.0.0
breakingCannot use both 'uglifyJS' and 'terser' options simultaneously. If both are provided, the plugin will throw an error.
fix
Choose only one minifier: either UglifyJS or Terser.
affects: >=1.0.0
gotchaWith UglifyJS (not Terser), ES6+ syntax will cause an error because UglifyJS only supports ES5. Use terser option for ES6+.
fix
Set terser options instead of uglifyJS if your code uses ES6+.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack-parallel-uglify-plugin'
Package not installed or import path incorrect.
fix
Run 'npm install webpack-parallel-uglify-plugin --save-dev' and ensure correct import statement.
TypeError: ParallelUglifyPlugin is not a constructor
Using CommonJS require without accessing .default property.
fix
Use 'const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin').default;'
Error: ParallelUglifyPlugin: you cannot use both uglifyJS and terser
Both minifier options provided simultaneously.
fix
Remove one of the options: either uglifyJS or terser.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
webpackrequiredpeer dependency; plugin only works with webpack builds
Agent activity
6 hits · last 30 days
node
6
Resources
webpack-parallel-uglify-plugin — npm install webpack-parallel-uglify-plugin · libregistry