1111[ ![ discussion] [ discussion ]] [ discussion-url ]
1212[ ![ size] [ size ]] [ size-url ]
1313
14- # terser -webpack-plugin
14+ # minimizer -webpack-plugin
1515
1616This plugin minifies your assets in a webpack build. It ships with several
1717built-in minimizers covering JavaScript, JSON, HTML, and CSS — pick one
@@ -51,34 +51,34 @@ file types with different minimizers (see [Examples](#examples)).
5151
5252## Getting Started
5353
54- Webpack v5 comes with the latest ` terser -webpack-plugin` out of the box.
55- If you are using Webpack v5 or above and wish to customize the options, you will still need to install ` terser -webpack-plugin` .
56- Using Webpack v4, you have to install ` terser-webpack-plugin ` v4.
54+ Webpack v5 comes with the latest ` minimizer -webpack-plugin` out of the box.
55+ If you are using Webpack v5 or above and wish to customize the options, you will still need to install ` minimizer -webpack-plugin` .
56+ Using Webpack v4, you have to install ` terser-webpack-plugin ` v4 ( ` minimizer-webpack-plugin ` is only published for Webpack v5+) .
5757
58- To begin, you'll need to install ` terser -webpack-plugin` :
58+ To begin, you'll need to install ` minimizer -webpack-plugin` :
5959
6060``` console
61- npm install terser -webpack-plugin --save-dev
61+ npm install minimizer -webpack-plugin --save-dev
6262```
6363
6464or
6565
6666``` console
67- yarn add -D terser -webpack-plugin
67+ yarn add -D minimizer -webpack-plugin
6868```
6969
7070or
7171
7272``` console
73- pnpm add -D terser -webpack-plugin
73+ pnpm add -D minimizer -webpack-plugin
7474```
7575
7676Then add the plugin to your ` webpack ` configuration. For example:
7777
7878** webpack.config.js**
7979
8080``` js
81- const TerserPlugin = require (" terser -webpack-plugin" );
81+ const TerserPlugin = require (" minimizer -webpack-plugin" );
8282
8383module .exports = {
8484 optimization: {
@@ -212,7 +212,7 @@ Default number of concurrent runs: `os.cpus().length - 1` or `os.availableParall
212212
213213> ** Warning**
214214>
215- > If you use ** Circle CI** or any other environment that doesn't provide the real available count of CPUs then you need to explicitly set up the number of CPUs to avoid ` Error: Call retries were exceeded ` (see [ #143 ] ( https://github.com/webpack/terser -webpack-plugin/issues/143 ) , [ #202 ] ( https://github.com/webpack/terser -webpack-plugin/issues/202 ) ).
215+ > If you use ** Circle CI** or any other environment that doesn't provide the real available count of CPUs then you need to explicitly set up the number of CPUs to avoid ` Error: Call retries were exceeded ` (see [ #143 ] ( https://github.com/webpack/minimizer -webpack-plugin/issues/143 ) , [ #202 ] ( https://github.com/webpack/minimizer -webpack-plugin/issues/202 ) ).
216216
217217#### ` boolean `
218218
@@ -1033,7 +1033,7 @@ npm install --save-dev @minify-html/node
10331033** webpack.config.js**
10341034
10351035``` js
1036- const TerserPlugin = require (" terser -webpack-plugin" );
1036+ const TerserPlugin = require (" minimizer -webpack-plugin" );
10371037
10381038module .exports = {
10391039 optimization: {
@@ -1062,7 +1062,7 @@ Use `swcMinifyHtml` for complete HTML documents (i.e. with a doctype and `<html>
10621062** webpack.config.js**
10631063
10641064``` js
1065- const TerserPlugin = require (" terser -webpack-plugin" );
1065+ const TerserPlugin = require (" minimizer -webpack-plugin" );
10661066
10671067module .exports = {
10681068 optimization: {
@@ -1087,7 +1087,7 @@ Use `swcMinifyHtmlFragment` for partial HTML — for example, content of `<templ
10871087** webpack.config.js**
10881088
10891089``` js
1090- const TerserPlugin = require (" terser -webpack-plugin" );
1090+ const TerserPlugin = require (" minimizer -webpack-plugin" );
10911091
10921092module .exports = {
10931093 optimization: {
@@ -1117,7 +1117,7 @@ module.exports = {
11171117** webpack.config.js**
11181118
11191119``` js
1120- const TerserPlugin = require (" terser -webpack-plugin" );
1120+ const TerserPlugin = require (" minimizer -webpack-plugin" );
11211121
11221122module .exports = {
11231123 optimization: {
@@ -1181,7 +1181,7 @@ npm install --save-dev @swc/css
11811181** webpack.config.js**
11821182
11831183``` js
1184- const TerserPlugin = require (" terser -webpack-plugin" );
1184+ const TerserPlugin = require (" minimizer -webpack-plugin" );
11851185
11861186module .exports = {
11871187 optimization: {
@@ -1209,7 +1209,7 @@ module.exports = {
12091209** webpack.config.js**
12101210
12111211``` js
1212- const TerserPlugin = require (" terser -webpack-plugin" );
1212+ const TerserPlugin = require (" minimizer -webpack-plugin" );
12131213
12141214module .exports = {
12151215 optimization: {
@@ -1234,7 +1234,7 @@ module.exports = {
12341234** webpack.config.js**
12351235
12361236``` js
1237- const TerserPlugin = require (" terser -webpack-plugin" );
1237+ const TerserPlugin = require (" minimizer -webpack-plugin" );
12381238
12391239module .exports = {
12401240 optimization: {
@@ -1259,7 +1259,7 @@ module.exports = {
12591259** webpack.config.js**
12601260
12611261``` js
1262- const TerserPlugin = require (" terser -webpack-plugin" );
1262+ const TerserPlugin = require (" minimizer -webpack-plugin" );
12631263
12641264module .exports = {
12651265 optimization: {
@@ -1284,7 +1284,7 @@ module.exports = {
12841284** webpack.config.js**
12851285
12861286``` js
1287- const TerserPlugin = require (" terser -webpack-plugin" );
1287+ const TerserPlugin = require (" minimizer -webpack-plugin" );
12881288
12891289module .exports = {
12901290 optimization: {
@@ -1309,7 +1309,7 @@ module.exports = {
13091309** webpack.config.js**
13101310
13111311``` js
1312- const TerserPlugin = require (" terser -webpack-plugin" );
1312+ const TerserPlugin = require (" minimizer -webpack-plugin" );
13131313
13141314module .exports = {
13151315 optimization: {
@@ -1503,21 +1503,21 @@ module.exports = {
15031503We welcome all contributions!
15041504If you're new here, please take a moment to review our contributing guidelines before submitting issues or pull requests.
15051505
1506- [ CONTRIBUTING] ( https://github.com/webpack/terser -webpack-plugin?tab=contributing-ov-file#contributing )
1506+ [ CONTRIBUTING] ( https://github.com/webpack/minimizer -webpack-plugin?tab=contributing-ov-file#contributing )
15071507
15081508## License
15091509
15101510[ MIT] ( ./LICENSE )
15111511
1512- [ npm ] : https://img.shields.io/npm/v/terser -webpack-plugin.svg
1513- [ npm-url ] : https://npmjs.com/package/terser -webpack-plugin
1514- [ node ] : https://img.shields.io/node/v/terser -webpack-plugin.svg
1512+ [ npm ] : https://img.shields.io/npm/v/minimizer -webpack-plugin.svg
1513+ [ npm-url ] : https://npmjs.com/package/minimizer -webpack-plugin
1514+ [ node ] : https://img.shields.io/node/v/minimizer -webpack-plugin.svg
15151515[ node-url ] : https://nodejs.org
1516- [ tests ] : https://github.com/webpack/terser -webpack-plugin/workflows/terser -webpack-plugin/badge.svg
1517- [ tests-url ] : https://github.com/webpack/terser -webpack-plugin/actions
1518- [ cover ] : https://codecov.io/gh/webpack/terser -webpack-plugin/branch/main/graph/badge.svg
1519- [ cover-url ] : https://codecov.io/gh/webpack/terser -webpack-plugin
1516+ [ tests ] : https://github.com/webpack/minimizer -webpack-plugin/workflows/minimizer -webpack-plugin/badge.svg
1517+ [ tests-url ] : https://github.com/webpack/minimizer -webpack-plugin/actions
1518+ [ cover ] : https://codecov.io/gh/webpack/minimizer -webpack-plugin/branch/main/graph/badge.svg
1519+ [ cover-url ] : https://codecov.io/gh/webpack/minimizer -webpack-plugin
15201520[ discussion ] : https://img.shields.io/github/discussions/webpack/webpack
15211521[ discussion-url ] : https://github.com/webpack/webpack/discussions
1522- [ size ] : https://packagephobia.now.sh/badge?p=terser -webpack-plugin
1523- [ size-url ] : https://packagephobia.now.sh/result?p=terser -webpack-plugin
1522+ [ size ] : https://packagephobia.now.sh/badge?p=minimizer -webpack-plugin
1523+ [ size-url ] : https://packagephobia.now.sh/result?p=minimizer -webpack-plugin
0 commit comments