Skip to content
PluginStats

terser-webpack-plugin weekly downloads statistics

By webpack (4 listings) · npm · Webpack plugins

Minimizer plugin for webpack

View on npm Fresh · Dec 6, 2026

terser-webpack-plugin has 56,153,010 recorded weekly downloads on npm, an increase of 3.5% over the past 30 days, ranking #78 of 3,247 tracked listings.

Weekly downloads
56,153,010
Official API · Dec 5, 2026
7-day growth
+10.3%
+5.2M weekly downloads
30-day growth
+3.5%
+1.9M weekly downloads
90-day growth
+40.3%
+16.1M weekly downloads
Rank
#78
▼ 8 in 7 days

About terser-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] [![tests][tests]][tests-url] [![cover][cover]][cover-url] [![discussion][discussion]][discussion-url] [![size][size]][size-url]

minimizer-webpack-plugin

This plugin minifies your assets in a webpack build. It ships with several built-in minimizers covering JavaScript, JSON, HTML, and CSS — pick one with the minify option and target the right files with test.

JavaScript minimizers:

  • terser — MinimizerPlugin.terserMinify (default). The same JavaScript-based minifier that webpack uses out of the box; produces small, well-tested output and supports the full set of extractComments modes.
  • uglify-js — MinimizerPlugin.uglifyJsMinify. ES5-only minifier, useful when you specifically need UglifyJS-compatible output. Requires npm install --save-dev uglify-js.
  • @swc/core — MinimizerPlugin.swcMinify. A very fast Rust-based JavaScript/TypeScript minifier. Requires npm install --save-dev @swc/core.
  • esbuild — MinimizerPlugin.esbuildMinify. An extremely fast JS bundler/minifier; legal comments are always preserved (no extractComments support). Requires npm install --save-dev esbuild.

JSON minimizer:

  • JSON.stringify — MinimizerPlugin.jsonMinify. Built in (no extra dependency); supports space and replacer options.

HTML minimizers:

  • html-minifier-terser — MinimizerPlugin.htmlMinifierTerser. The default HTML minimizer. JavaScript-based, no native dependency. Requires npm install --save-dev html-minifier-terser.
  • @swc/html — MinimizerPlugin.swcMinifyHtml (full HTML documents) and MinimizerPlugin.swcMinifyHtmlFragment (HTML fragments, e.g. <template> content). Very fast Rust-based platform for the Web. Requires npm install --save-dev @swc/html.
  • @minify-html/node — MinimizerPlugin.minifyHtmlNode. A Rust HTML minifier optimised for speed and effectiveness. Requires npm install --save-dev @minify-html/node.

CSS minimizers:

  • cssnano — MinimizerPlugin.cssnanoMinify. The default CSS minimizer. Built on top of PostCSS. Requires npm install --save-dev cssnano postcss.
  • csso — MinimizerPlugin.cssoMinify. A CSS minifier with structural optimisations. Requires npm install --save-dev csso.
  • clean-css — MinimizerPlugin.cleanCssMinify. A widely-used CSS optimiser. Requires npm install --save-dev clean-css.
  • esbuild — MinimizerPlugin.esbuildMinifyCss. Very fast CSS minification using esbuild's CSS loader. Requires npm install --save-dev esbuild.
  • lightningcss — MinimizerPlugin.lightningCssMinify. A Rust-based CSS parser, transformer, and minifier. Requires npm install --save-dev lightningcss.
  • @swc/css — MinimizerPlugin.swcMinifyCss. A very fast Rust-based CSS minifier. Requires npm install --save-dev @swc/css.

All of the non-default minimizers are declared as optional peer dependencies — install only the ones you actually use. You can also stack multiple MinimizerPlugin instances in the same build to handle different file types with different minimizers (see Examples).

Getting Started

Webpack v5 comes with the latest minimizer-webpack-plugin out of the box. If you are using Webpack v5 or above and wish to customize the options, you will still need to install minimizer-webpack-plugin. Using Webpack v4, you have to install terser-webpack-plugin v4 (minimizer-webpack-plugin is only published for Webpack v5+).

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

npm install minimizer-webpack-plugin --save-dev

or

yarn add -D minimizer-webpack-plugin

or

pnpm add -D minimizer-webpack-plugin

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

webpack.config.js

const MinimizerPlugin = require("minimizer-webpack-plugin");

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

Finally, run webpack using the method you normally use (e.g., via CLI or an npm script).

Note about source maps

Works only with source-map, inline-source-map, hidden-source-map and nosources-source-map values for the devtool option.

Why?

  • eval wraps modules in eval("string") and the minimizer does not handle strings.
  • cheap has no column information and the minimizer generates only a single line, which leaves only a single mapping.

Using supported devtool values enable source map generation.

Options

test

Type:

type test = string | RegExp | (string | RegExp)[];

Default: /\.m?js(\?.*)?$/i

Test to match files against.

webpack.config.js

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

Type:

type include = string | RegExp | (string | RegExp)[];

Default: undefined

Files to include.

webpack.config.js…

Description from the npm listing.

  • uglify
  • uglify-js
  • uglify-es
  • terser
  • swc
  • esbuild
  • html
  • html-minifier
  • html-minifier-terser
  • css
  • cssnano
  • csso
  • clean-css
  • lightningcss
  • webpack
  • webpack-plugin
  • minification
  • compress
  • compressor
  • min

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 weekly downloads on npm, last 90 days: 56,153,010 weekly downloads as of Dec 5, 2026, +40.3% over 90 days.terser-webpack-pluginWeekly downloads on npm · Last 90 days56,153,010downloads / week+40.3% over 90 days010M20M30M40M50M60MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
terser-webpack-plugin weekly downloads on npm, last 90 days: 56,153,010 weekly downloads as of Dec 5, 2026, +40.3% over 90 days.

7/30/90-day growth

terser-webpack-plugin weekly downloads growth on npm: +10.3% over 7 days, +3.5% over 30 days, +40.3% over 90 days.terser-webpack-pluginWeekly downloads growth on npm56,153,010downloads / week now7-day growth+5,230,050 weekly downlo…+10.3%30-day growth+1,879,864 weekly downlo…+3.5%90-day growth+16,116,844 weekly downl…+40.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
terser-webpack-plugin weekly downloads growth on npm: +10.3% over 7 days, +3.5% over 30 days, +40.3% over 90 days.

Ranking history

terser-webpack-plugin npm ranking history: currently #78 (by weekly downloads).terser-webpack-pluginnpm ranking · by weekly downloads · Last 90 days#78current rank#10#20#30#40#50#60#70#80Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
terser-webpack-plugin npm ranking history: currently #78 (by weekly downloads).

Listing placement

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

Listing placement

Webpack plugins349 listings · 18 pages · page 1, #2 (overall #2)
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 (592)
Recent weekly downloads observations for terser-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
56,153,010+305.1K
55,847,873+1.7M
54,190,709+1.7M
52,442,025+707.4K
51,734,605+735K
50,999,604+154.5K
50,845,151-77.8K
50,922,960-236.8K
51,159,731-1.3M
52,501,175-1.8M
54,319,415-959.9K
55,279,346-438.7K
55,718,071-394.3K
56,112,397—

Similar npm Webpack plugins plugins

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