uglifyjs-webpack-plugin weekly downloads statistics
By webpack-contrib (7 listings) · npm · Webpack plugins
UglifyJS plugin for webpack
uglifyjs-webpack-plugin has 343,858 recorded weekly downloads on npm, a decrease of 49.8% over the past 30 days.
It ranks #288 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -49.6%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About uglifyjs-webpack-plugin
[![npm][npm]][npm-url] [![node][node]][node-url] [![deps][deps]][deps-url] [![tests][tests]][tests-url] [![cover][cover]][cover-url] [![chat][chat]][chat-url] [![size][size]][size-url]
UglifyJS Webpack Plugin
This plugin uses uglify-js to minify your JavaScript.
Requirements
This module requires a minimum of Node v6.9.0 and Webpack v4.0.0.
Getting Started
To begin, you'll need to install uglifyjs-webpack-plugin:
Then add the plugin to your webpack config. For example:
webpack.config.js
And run webpack via your preferred method.
Options
test
Type: String|RegExp|Array Default: /\.js(\?.*)?$/i
Test to match files against.
webpack.config.js
include
Type: String|RegExp|Array Default: undefined
Files to include.
webpack.config.js
exclude
Type: String|RegExp|Array Default: undefined
Files to exclude.
webpack.config.js
chunkFilter
Type: Function boolean> Default: () => true
Allowing to filter which chunks should be uglified (by default all chunks are uglified). Return true to uglify the chunk, false otherwise.
webpack.config.js
cache
Type: Boolean|String Default: false
Enable file caching. Default path to cache directory: node_modules/.cache/uglifyjs-webpack-plugin.
ℹ️ If you use your own minify function please read the minify section for cache invalidation correctly.
Boolean
Enable/disable file caching.
webpack.config.js
String
Enable file caching and set path to cache directory.
webpack.config.js
webpack.config.js
cacheKeys
Type: Function Object> Default: defaultCacheKeys => defaultCacheKeys
Allows you to override default cache keys.
Default cache keys:
webpack.config.js
parallel
Type: Boolean|Number Default: false
Use multi-process parallel running to improve the build speed. Default number of concurrent runs: os.cpus().length - 1.
ℹ️ Parallelization can speedup your build significantly and is therefore highly recommended.
Boolean
Enable/disable multi-process parallel running.
webpack.config.js
Number
Enable multi-process parallel running and set number of concurrent runs.
webpack.config.js
sourceMap
Type: Boolean Default: false
Use source maps to map error message locations to modules (this slows down the compilation). If you use your own minify function please read the minify section for handling source maps correctly.
⚠️ cheap-source-map options don't work with this plugin.
webpack.config.js
minify
Type: Function Default: undefined
Allows you to override default minify function. By default plugin uses uglify-js package. Useful for using and testing unpublished versions or forks.
⚠️ Always use require inside minify function when parallel option enabled.
webpack.config.js
uglifyOptions
Type: Object Default: default
UglifyJS minify options.
webpack.config.js
extractComments
Type: Boolean|String|RegExp|Function Boolean|Object> Default: false
Whether comments shall be extracted to a separate file, (see details). By default extract only comments using /^\**!|@preserve|@license|@cc_on/i regexp condition and remove remaining comments. If the original file is named foo.js, then the comments will be stored to foo.js.LICENSE. The uglifyOptions.output.comments option specifies whether the comment will be preserved, i.e. it is possible to preserve some comments (e.g. annotations) while extracting others or even preserving comments that have been extracted.
Boolean
Enable/disable extracting comments.
webpack.config.js
String
Extract all or some (use /^\**!|@preserve|@license|@cc_on/i RegExp) comments.
webpack.config.js
RegExp
All comments that match the given expression will be extracted to the separate file.
webpack.config.js
Function Boolean>
All comments that match the given expression will be extracted to the separate file.
webpack.config.js
Object
Allow to customize condition for extract comments, specify extracted file name and banner.
webpack.config.js
condition
Type: Boolean|String|RegExp|Function Boolean|Object>
Condition what comments you need extract.
webpack.config.js
filename
Type: Regex|Function String> Default: ${file}.LICENSE
The file where the extracted comments will be stored. Default is to append the suffix .LICENSE to the original filename.
webpack.config.js
banner
Type: Boolean|String|Function String> Default: /*! For license information please see ${commentsFile} */
The banner text that points to the extracted file and will be added on top of the original file. Can be false (no banner), a String, or a Function String> that will be called with the filename where extracted comments have been stored. Will be wrapped into comment.
webpack.config.js
warningsFilter
Type: Function Boolean> Default: () => true
Allow to filter uglify-js warnings. Return true to keep the warning, false otherwise.
webpack.config.js
Examples
Cache And Parallel
Enable cache and multi-process parallel running.
webpack.config.js
Preserve Comments
Extract all legal comments (i.e. /^\**!|@preserve|@license|@cc_on/i) and preserve /@license/i comments.
webpack.config.js
Remove Comments
If you avoid building with comments, set uglifyOptions.output.comments to false as in this config:
webpack.config.js
Custom Minify Function
Override default minify function - use terser for minification.
webpack.config.js
Contributing
Please take a moment to read our contributing guidelines if you haven't yet done so.
CONTRIBUTING
License
MIT
Description from the npm listing.
- uglify
- uglify-js
- uglify-es
- webpack
- webpack-plugin
Where uglifyjs-webpack-plugin sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (121)Similar npm Webpack plugins plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/uglifyjs-webpack-plugin. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.