Skip to content
PluginStats

uglifyjs-webpack-plugin weekly downloads statistics

By webpack-contrib (7 listings) · npm · Webpack plugins

UglifyJS plugin for webpack

View on npm Fresh · Dec 6, 2026

uglifyjs-webpack-plugin has 649,316 recorded weekly downloads on npm, a decrease of 4.1% over the past 30 days, ranking #339 of 3,247 tracked listings.

Weekly downloads
649,316
Official API · Dec 5, 2026
7-day growth
-6.5%
-45.3K weekly downloads
30-day growth
-4.1%
-27.9K weekly downloads
90-day growth
+1.3%
+8.1K weekly downloads
Rank
#339
▼ 21 in 7 days

About uglifyjs-webpack-plugin

<div align="center"> <a href="https://github.com/webpack/webpack"> <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg"> </a> </div>

[![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:

$ npm install uglifyjs-webpack-plugin --save-dev

Then add the plugin to your webpack config. For example:

webpack.config.js

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
  optimization: {
    minimizer: [new UglifyJsPlugin()],
  },
};

And run webpack via your preferred method.

Options

test

Type: String|RegExp|Array<String|RegExp> Default: /\.js(\?.*)?$/i

Test to match files against.

webpack.config.js

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        test: /\.js(\?.*)?$/i,
      }),
    ],
  },
};
include

Type: String|RegExp|Array<String|RegExp> Default: undefined

Files to include.

webpack.config.js

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        include: /\/includes/,
      }),
    ],
  },
};
exclude

Type: String|RegExp|Array<String|RegExp> Default: undefined

Files to exclude.

webpack.config.js

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        exclude: /\/excludes/,
      }),
    ],
  },
};
chunkFilter

Type: Function<(chunk) -> 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

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        chunkFilter: (chunk) => {
          // Exclude uglification for the `vendor` chunk
          if (chunk.name === 'vendor') {
            return false;
          }

          return true;
        },
      }),
    ],
  },
};
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

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        cache: true,
      }),
    ],
  },
};
String

Enable file caching and set path to cache directory.

webpack.config.js

webpack.config.js

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        cache: 'path/to/cache',
      }),
    ],
  },
};
cacheKeys

Type: Function<(defaultCacheKeys, file) -> Object> Default: defaultCacheKeys => defaultCacheKeys

Allows you to override default cache keys.

Default cache keys:

({
  'uglify-js': require('uglify-js/package.json').version, // uglify version
  'uglifyjs-webpack-plugin': require('../package.json').version, // plugin version
  'uglifyjs-webpack-plugin-options': this.options, // plugin options
  path: compiler.outputPath ? `${compiler.outputPath}/${file}` : file, // asset path
  hash: crypto
    .createHash('md4')
    .update(input)
    .digest('hex'), // source file hash
});

webpack.config.js

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        cache: true,
        cacheKeys: (defaultCacheKeys, file) => {
          defaultCacheKeys.myCacheKey = 'myCacheKeyValue';

          return defaultCacheKeys;
        },
      }),
    ],
  },
};
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

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        parallel: true,
      }),
    ],
  },
};
Number

Enable multi-process parallel running and set number of concurrent runs.

webpack.config.js

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        parallel: 4,
      }),
    ],
  },
};
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

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        sourceMap: true,
      }),
    ],
  },
};
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

module.exports = {
  optimization: {
    minimizer: [
      new UglifyJsPlugin({
        minify(file, sourceMap) {
          const extractedComments = [];

          // Custom logic for extract comments…

Description from the npm listing.

  • uglify
  • uglify-js
  • uglify-es
  • 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

uglifyjs-webpack-plugin weekly downloads on npm, last 90 days: 649,316 weekly downloads as of Dec 5, 2026, +1.3% over 90 days.uglifyjs-webpack-pluginWeekly downloads on npm · Last 90 days649,316downloads / week+1.3% over 90 days0200K400K600K800K1M1.2M1.4M1.6MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
uglifyjs-webpack-plugin weekly downloads on npm, last 90 days: 649,316 weekly downloads as of Dec 5, 2026, +1.3% over 90 days.

7/30/90-day growth

uglifyjs-webpack-plugin weekly downloads growth on npm: -6.5% over 7 days, -4.1% over 30 days, +1.3% over 90 days.uglifyjs-webpack-pluginWeekly downloads growth on npm649,316downloads / week now7-day growth-45,317 weekly downloads-6.5%30-day growth-27,854 weekly downloads-4.1%90-day growth+8,116 weekly downloads+1.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
uglifyjs-webpack-plugin weekly downloads growth on npm: -6.5% over 7 days, -4.1% over 30 days, +1.3% over 90 days.

Ranking history

uglifyjs-webpack-plugin npm ranking history: currently #339 (by weekly downloads).uglifyjs-webpack-pluginnpm ranking · by weekly downloads · Last 90 days#339current rank#280#290#300#310#320#330#340#350Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
uglifyjs-webpack-plugin npm ranking history: currently #339 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 17, #19 (overall #339)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 1, #7 (overall #7)
Webpack plugins: every listing in weekly downloads order

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)
Recent weekly downloads observations for uglifyjs-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
649,316-7.3K
656,628-1.7K
658,339+4.7K
653,647-9.4K
663,023+3.6K
659,438-24.4K
683,887-10.7K
694,633-4.7K
699,356+880
698,476-6.9K
705,377+2.4K
702,963+13.2K
689,811+39.5K
650,281—

Similar npm Webpack plugins plugins

All 20 uglifyjs-webpack-plugin alternatives

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 Dec 6, 2026. See the methodology.