uglifyjs-3-webpack-plugin weekly downloads statistics
By whtsky · npm · Webpack plugins
UglifyJS plugin for webpack
uglifyjs-3-webpack-plugin has 322 recorded weekly downloads on npm, a decrease of 1.8% over the past 30 days, ranking #2364 of 3,247 tracked listings.
About uglifyjs-3-webpack-plugin
[![npm][npm]][npm-url] [![node][node]][node-url] [![deps][deps]][deps-url] [![test][test]][test-url] [![coverage][cover]][cover-url] [![chat][chat]][chat-url]
<div align="center"> <a href="https://github.com/webpack/webpack"> <img width="200" height="200" src="https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg"> </a> <h1>UglifyJS Webpack Plugin</h1> <p>This plugin uses <a href="https://github.com/mishoo/UglifyJS2/">UglifyJS v3 </a>to minify your JavaScript</p> </div> <h2 align="center">Install</h2>npm i -D uglifyjs-3-webpack-plugin
<h2 align="center">Usage</h2>
webpack.config.js
const UglifyJsPlugin = require('uglifyjs-3-webpack-plugin')
module.exports = {
plugins: [
new UglifyJsPlugin()
]
}
<h2 align="center">Options</h2>
| Name | Type | Default | Description |
|---|---|---|---|
test | {RegExp|Array<RegExp>} | <code>/\.js$/i</code> | Test to match files against |
include | {RegExp|Array<RegExp>} | undefined | Files to include |
exclude | {RegExp|Array<RegExp>} | undefined | Files to exclude |
cache | {Boolean|String} | false | Enable file caching |
parallel | {Boolean|Number} | false | Use multi-process parallel running to improve the build speed |
sourceMap | {Boolean} | false | Use source maps to map error message locations to modules (This slows down the compilation) ⚠️ cheap-source-map options don't work with this plugin |
uglifyOptions | {Object} | {...defaults} | uglify Options |
extractComments | {Boolean|RegExp|Function<(node, comment) -> {Boolean|Object}>} | false | Whether comments shall be extracted to a separate file, (see details (webpack >= 2.3.0) |
warningsFilter | {Function(source) -> {Boolean}} | () => true | Allow to filter uglify warnings |
test
webpack.config.js
[
new UglifyJsPlugin({
test: /\.js($|\?)/i
})
]
include
webpack.config.js
[
new UglifyJsPlugin({
include: /\/includes/
})
]
exclude
webpack.config.js
[
new UglifyJsPlugin({
exclude: /\/excludes/
})
]
cache
{Boolean}
webpack.config.js
[
new UglifyJsPlugin({
cache: true
})
]
Enable file caching.
Default path to cache directory: node_modules/.cache/uglifyjs-webpack-plugin.
{String}
webpack.config.js
[
new UglifyJsPlugin({
cache: 'path/to/cache'
})
]
Path to cache directory.
parallel
{Boolean}
webpack.config.js
[
new UglifyJsPlugin({
parallel: true
})
]
Enable parallelization.
Default number of concurrent runs: os.cpus().length - 1.
{Number}
webpack.config.js
[
new UglifyJsPlugin({
parallel: 4
})
]
Number of concurrent runs.
ℹ️ Parallelization can speedup your build significantly and is therefore highly recommended
sourceMap
webpack.config.js
[
new UglifyJsPlugin({
sourceMap: true
})
]
⚠️
cheap-source-mapoptions don't work with this plugin
uglifyOptions
| Name | Type | Default | Description |
|---|---|---|---|
warnings | {Boolean} | false | Display Warnings |
parse | {Object} | {} | Additional Parse Options |
compress | {Boolean|Object} | true | Additional Compress Options |
mangle | {Boolean|Object} | true | Enable Name Mangling (See Mangle Properties for advanced setups, use with ⚠️) |
output | {Object} | {} | Additional Output Options (The defaults are optimized for best compression) |
toplevel | {Boolean} | false | Enable top level variable and function name mangling and to drop unused variables and functions |
nameCache | {Object} | null | Enable cache of mangled variable and property names across multiple invocations |
ie8 | {Boolean} | false | Enable IE8 Support |
keep_fnames | {Boolean} | false | Enable prevent discarding or mangling of function names. Useful for code relying on Function.prototype.name. |
webpack.config.js
[
new UglifyJsPlugin({
uglifyOptions: {
warnings: false,
parse: {...options},
compress: {...options},
mangle: {
...options,
properties: {
// mangle property options
}
},
output: {
comments: false,
beautify: false,
...options
},
toplevel: false,
nameCache: null,
ie8: false,
keep_fnames: false,
}
})
]
extractComments
{Boolean}
All comments that normally would be preserved by the comments option will be moved to a separate file. If the original file is named foo.js, then the comments will be stored to foo.js.LICENSE.
{RegExp|String} or {Function<(node, comment) -> {Boolean}>}
All comments that match the given expression (resp. are evaluated to true by the function) will be extracted to the separate file. The 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.
{Object}…
Description from the npm listing.
- uglify
- uglify-js
- webpack
- webpack-plugin
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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.
Each band is one page of 20. Weekly downloads on a linear 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.
Recent observations
Full history (170)Similar npm Webpack plugins plugins
All 20 uglifyjs-3-webpack-plugin alternativesData 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-3-webpack-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.