Skip to content
PluginStats

terser-webpack-plugin-legacy weekly downloads statistics

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

Terser plugin for webpack

View on npm Stale · Oct 18, 2026

terser-webpack-plugin-legacy has 1,481 recorded weekly downloads on npm, a decrease of 32.3% over the past 30 days, ranking #1404 of 2,391 tracked listings.

Weekly downloads
1,481
Official API · Oct 18, 2026
7-day growth
-41.1%
-1K weekly downloads
30-day growth
-32.3%
-705 weekly downloads
90-day growth
-53.7%
-1.7K weekly downloads
Rank
#1404
Among tracked npm listings

About terser-webpack-plugin-legacy

<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]

terser-webpack-plugin-legacy

This plugin uses terser to minify your JavaScript.

Requirements

This module requires a minimum of Node v6.9.0 and Webpack v3.0.0.

Webpack v4 users should use the non-legacy terser-webpack-plugin.

Getting Started

To begin, you'll need to install terser-webpack-plugin-legacy:

$ npm install terser-webpack-plugin-legacy --save-dev

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

webpack.config.js

const TerserPlugin = require('terser-webpack-plugin-legacy');

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

And run webpack via your preferred method.

Options

test

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

Test to match files against.

webpack.config.js

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

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

Files to include.

webpack.config.js

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

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

Files to exclude.

webpack.config.js

module.exports = {
  optimization: {
    minimizer: [
      new TerserPlugin({
        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 TerserPlugin({
        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/terser-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 TerserPlugin({
        cache: true,
      }),
    ],
  },
};
String

Enable file caching and set path to cache directory.

webpack.config.js

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

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

Allows you to override default cache keys.

Default cache keys:

({
  terser: require('terser/package.json').version, // terser version
  'terser-webpack-plugin': require('../package.json').version, // plugin version
  'terser-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 TerserPlugin({
        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 TerserPlugin({
        parallel: true,
      }),
    ],
  },
};
Number

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

webpack.config.js

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

Type: Function Default: undefined

Allows you to override default minify function. By default plugin uses terser 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 TerserPlugin({
        minify: (file, sourceMap) => {
          const extractedComments = [];

          // Custom logic for extract comments…

Description from the npm listing.

  • uglify
  • uglify-js
  • uglify-es
  • terser
  • webpack
  • webpack-plugin
  • minification
  • compress
  • compressor
  • min
  • minifier
  • minify
  • optimize
  • optimizer

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

terser-webpack-plugin-legacy weekly downloads on npm, last 90 days: 1,481 weekly downloads as of Oct 18, 2026, -53.7% over 90 days.terser-webpack-plugin-legacyWeekly downloads on npm · Last 90 days1,481downloads / week-53.7% over 90 days01K2K3K4K5KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
terser-webpack-plugin-legacy weekly downloads on npm, last 90 days: 1,481 weekly downloads as of Oct 18, 2026, -53.7% over 90 days.

7/30/90-day growth

terser-webpack-plugin-legacy weekly downloads growth on npm: -41.1% over 7 days, -32.3% over 30 days, -53.7% over 90 days.terser-webpack-plugin-legacyWeekly downloads growth on npm1,481downloads / week now7-day growth-1,033 weekly downloads-41.1%30-day growth-705 weekly downloads-32.3%90-day growth-1,719 weekly downloads-53.7%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
terser-webpack-plugin-legacy weekly downloads growth on npm: -41.1% over 7 days, -32.3% over 30 days, -53.7% over 90 days.

Ranking history

terser-webpack-plugin-legacy npm ranking history: currently #1404 (by weekly downloads).terser-webpack-plugin-legacynpm ranking · by weekly downloads · Last 90 days#1404current rank#1320#1340#1360#1380#1400#1420Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 18, 2026 – Oct 21, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
terser-webpack-plugin-legacy npm ranking history: currently #1404 (by weekly downloads).

Listing placement

All npm2,389 listings · 120 pages · 1,195 shown · page 71, #19 (overall #1,419)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins257 listings · 13 pages · page 3, #10 (overall #50)
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 (122)
Recent weekly downloads observations for terser-webpack-plugin-legacy
Date (UTC)Weekly downloadsChange vs. previous
1,481+51
1,430-229
1,659+73
1,586-568
2,154-528
2,6820
2,682+168
2,514-10
2,524+133
2,391+182
2,209+98
2,111-47
2,158-555
2,713—

Similar npm Webpack plugins plugins

All 20 terser-webpack-plugin-legacy 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/terser-webpack-plugin-legacy. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.