{"_id":"minimizer-webpack-plugin","_rev":"11-741ff35b993504768b27847664956bb9","name":"minimizer-webpack-plugin","dist-tags":{"latest":"5.12.0"},"versions":{"0.0.1":{"name":"minimizer-webpack-plugin","version":"0.0.1","_id":"minimizer-webpack-plugin@0.0.1","maintainers":[{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"dist":{"shasum":"357fbc5a3f9d8834e17dcab1ee92b9a8fa815a92","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-0.0.1.tgz","fileCount":1,"integrity":"sha512-AcmiOStq6da+JREkK9TFpZzECTT9vCWlBKYWgxvJ1b/ooGgunbgTMpoOpu/2k1ia0MTLq6MJGwmoHfp9bg1VLA==","signatures":[{"sig":"MEUCIA9KqHi+VmRoVPXgDsu17JhdMU5FziWZpZWbAZJser95AiEA9N6WQ2qq8yrVs1mH8TYftl71aoLM7BHHms4LJ7pOtzY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63},"gitHead":"e06c5269d55e916ee2629d9af5d812b64b62bec7","_npmUser":{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},"_npmVersion":"11.11.0","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_0.0.1_1778255762768_0.04061195017798491","host":"s3://npm-registry-packages-npm-production"}},"5.6.0":{"name":"minimizer-webpack-plugin","version":"5.6.0","keywords":["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","minification","minifier","minify","optimize","optimizer"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.6.0","maintainers":[{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"e5eb7e8ad6647042e33aa13bcb3f05f397e3d1da","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.6.0.tgz","fileCount":12,"integrity":"sha512-I61JptznJf4aEGwhumguL+UJZSO3/p9yvIilyPGKi+OIR/uyAkngrU2Z/Vj1apmS24aLyog6XaFBLaj8eDwztw==","signatures":[{"sig":"MEQCIEGwVmZy/3Co5NOZ0/bKslKSMAsWrBxvfCkUmEslqsWNAiA3aIj+QM6aZHP0FGHulFkicuodGDt0yw9vdkJpUVAyRQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":180199},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"57bdcfce0c18caff023bd6300f931d6f95ccf02c","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky install && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"jest","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.11.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.14.1","dependencies":{"terser":"^5.31.1","jest-worker":"^27.4.5","schema-utils":"^4.3.0","@jridgewell/trace-mapping":"^0.3.25"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.0.0","csso":"^5.0.5","jest":"^27.5.1","husky":"^7.0.2","memfs":"^3.4.13","cspell":"^6.31.2","eslint":"^9.29.0","cssnano":"^7.1.9","del-cli":"^3.0.1","esbuild":"^0.27.3","postcss":"^8.5.14","webpack":"^5.101.0","@swc/css":"^0.0.28","prettier":"^3.6.0","@swc/core":"^1.15.30","@swc/html":"^1.15.30","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.24.7","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.24.7","@types/csso":"^5.0.4","@types/node":"^24.2.1","file-loader":"^6.2.0","lint-staged":"^13.2.3","npm-run-all":"^4.1.5","webpack-cli":"^4.10.0","lightningcss":"^1.32.0","worker-loader":"^3.0.8","@changesets/cli":"^2.30.0","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.16.4","copy-webpack-plugin":"^9.0.1","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.0.5","eslint-config-webpack":"^4.5.1","@changesets/get-github-info":"^0.8.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.2"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.6.0_1778260845909_0.5340516702096643","host":"s3://npm-registry-packages-npm-production"}},"5.6.1":{"name":"minimizer-webpack-plugin","version":"5.6.1","keywords":["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","minification","minifier","minify","optimize","optimizer"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.6.1","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"289922a4c96c4ed1ddb76b8a00bd8074e89a2f7f","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.6.1.tgz","fileCount":12,"integrity":"sha512-DoeAZz8Q1C1znwsUzej1fdoi4jCf7/+Em27ouLqfK/+3m8G+D7yDhUwrc3CNhjSzGUN1kn7Iv4sWmjflQHenpw==","signatures":[{"sig":"MEQCIFKYX2G7JwlIHwvI6KfeDwDHbpO5sxCUbcBEd1Znm55VAiA40/7av7SCTMTrgHFCxfN8z3n3/lVM9O9psPf1Q0IqSA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.6.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":180367},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"5207f9415bc0592d7a2d49a84fb5b1ee33cf5e9d","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky install && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"jest","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.13.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.16.0","dependencies":{"terser":"^5.31.1","jest-worker":"^27.4.5","schema-utils":"^4.3.0","@jridgewell/trace-mapping":"^0.3.25"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.0.0","csso":"^5.0.5","jest":"^27.5.1","husky":"^7.0.2","memfs":"^3.4.13","cspell":"^6.31.2","eslint":"^9.29.0","cssnano":"^7.1.9","del-cli":"^3.0.1","esbuild":"^0.27.3","postcss":"^8.5.14","webpack":"^5.107.2","@swc/css":"^0.0.28","prettier":"^3.6.0","@swc/core":"^1.15.30","@swc/html":"^1.15.30","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.24.7","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.24.7","@types/csso":"^5.0.4","@types/node":"^24.2.1","file-loader":"^6.2.0","lint-staged":"^13.2.3","npm-run-all":"^4.1.5","webpack-cli":"^4.10.0","lightningcss":"^1.32.0","worker-loader":"^3.0.8","@changesets/cli":"^2.30.0","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.16.4","copy-webpack-plugin":"^9.0.1","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.0.5","eslint-config-webpack":"^4.5.1","@changesets/get-github-info":"^0.8.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.2"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.6.1_1779903083548_0.5429249960655853","host":"s3://npm-registry-packages-npm-production"}},"5.7.0":{"name":"minimizer-webpack-plugin","version":"5.7.0","keywords":["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","minification","minifier","minify","optimize","optimizer"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.7.0","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"16b4b57562b4e4aff8b82305a9cf0bdc3512eb06","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.7.0.tgz","fileCount":12,"integrity":"sha512-0ReIvHAVVojdDOn+kmRzrT62A6Btc9KeAK6ANTpd8+S5mnm5RDdu+EN6924xLFFzb36Rkoj+xOXkDA0jTHId/g==","signatures":[{"sig":"MEYCIQCplZbHNBmd4u9Ola72GXDChmsjvEYG8dKF8o9Z6WdnxgIhAOawVFEBTDZ/QHPJY/GwzdWfuNgaiIbA4nZ/n6ie2Foo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCVGDKkuYVI77uTyzqCb+S/4CS0ISmGHfKHWy4HMDCS1AIgTT/hYvs15GhZ7z2LXWrLkZkgx/aPRelbpIkSh7G0I3s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.7.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":212470},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"7f8b5eddeec1d7368141d49fdf3796e9a51d012e","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"jest","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.17.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.19.0","dependencies":{"terser":"^5.51.0","jest-worker":"^27.4.5","schema-utils":"^4.3.3","@jridgewell/trace-mapping":"^0.3.31"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.1.1","csso":"^5.0.5","jest":"^30.4.2","husky":"^9.1.7","memfs":"^4.68.1","cspell":"^10.1.1","eslint":"^10.9.1","cssnano":"^8.0.9","del-cli":"^7.0.0","esbuild":"^0.28.2","postcss":"^8.5.26","webpack":"^5.109.2","@swc/css":"^0.0.28","prettier":"^3.9.6","@swc/core":"^1.16.1","@swc/html":"^1.16.1","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.28.6","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.29.0","@types/csso":"^5.0.5","@types/node":"^26.3.0","file-loader":"^6.2.0","lint-staged":"^17.3.0","npm-run-all":"^4.1.5","webpack-cli":"^7.2.2","lightningcss":"^1.33.0","worker-loader":"^3.0.8","@changesets/cli":"^3.0.1","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.18.1","copy-webpack-plugin":"^14.0.0","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.1.0","eslint-config-webpack":"^4.9.6","@changesets/get-github-info":"^1.0.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.4"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.7.0_1787772787833_0.3511437742442123","host":"s3://npm-registry-packages-npm-production"}},"5.8.0":{"name":"minimizer-webpack-plugin","version":"5.8.0","keywords":["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","minification","minifier","minify","optimize","optimizer"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.8.0","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"744f0e28da888aa1708e2be32b4ddcf2eeb09e58","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.8.0.tgz","fileCount":12,"integrity":"sha512-2cT9+goJfBhtMz+gJqejSf09ClgmYhPhccRb/fb0ztVbixt0BkO8mRuI26FoPPuUNkRk6iEDryWAIouc5W8eJA==","signatures":[{"sig":"MEUCIQC7D+xMqCL8pAC6cArM/KZ47ctmd0YN4xjYx2fAZDWHDQIgZ1qscgP2xWPJJMwDR8ZY4+q7wIsZiiZ+RDc8IpgEmfg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBduRzDTfBnTYqfWNllTiGJm/UhuCwBQ/Dn4KZNxjPHSAiEA8+1X597LhiJt0TXXJKeTgHnHJRMgp2ut6ocD6x2hQP4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":214341},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"ecf06566cb04d575b874e3ede79d29ce11a35d7f","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"jest","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.17.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.19.0","dependencies":{"terser":"^5.51.0","jest-worker":"^27.4.5","schema-utils":"^4.3.3","@jridgewell/trace-mapping":"^0.3.31"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.1.1","csso":"^5.0.5","jest":"^30.4.2","husky":"^9.1.7","memfs":"^4.68.1","cspell":"^10.1.1","eslint":"^10.9.1","cssnano":"^8.0.9","del-cli":"^7.0.0","esbuild":"^0.28.2","postcss":"^8.5.26","webpack":"^5.109.2","@swc/css":"^0.0.28","prettier":"^3.9.6","@swc/core":"^1.16.1","@swc/html":"^1.16.1","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.28.6","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.29.0","@types/csso":"^5.0.5","@types/node":"^26.3.0","file-loader":"^6.2.0","lint-staged":"^17.3.0","npm-run-all":"^4.1.5","webpack-cli":"^7.2.2","lightningcss":"^1.33.0","worker-loader":"^3.0.8","@changesets/cli":"^3.0.1","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.18.1","copy-webpack-plugin":"^14.0.0","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.1.0","eslint-config-webpack":"^4.9.6","@changesets/get-github-info":"^1.0.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.4"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.8.0_1787829401961_0.3023918792508782","host":"s3://npm-registry-packages-npm-production"}},"5.9.0":{"name":"minimizer-webpack-plugin","version":"5.9.0","keywords":["avif","clean-css","compress","compressor","css","cssnano","csso","esbuild","html","html-minifier","html-minifier-terser","image","imagemin","images","jpeg","lightningcss","min","minification","minifier","minify","napi","optimize","optimizer","png","sharp","svg","svgo","swc","terser","uglify","uglify-es","uglify-js","webp","webpack","webpack-plugin"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.9.0","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"06c5ade7d028f3ff63321eab87f9c8c20bfa5ee8","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.9.0.tgz","fileCount":14,"integrity":"sha512-OASqv+dewv8vjkOBjqMOHvxUaXhtGBLZAXq7JbmYE8TSzBvOswiGq5JcBdc8ypuLL/8YUT1OEyupga6/iqdyTA==","signatures":[{"sig":"MEUCID50cdDqfzFT3m4s1JKfgK5PZYRQ1RgZvkFgd1HlJQ4vAiEAp0b7WgHWawMQz18UzdOm+kIG8+N+Ggswk9lWKIXQ5uQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIGWteLLV7KZTzSoOM1MtkmcpQCH6myee9O+z7nDPf9QaAiEAyxlPmhBNi2rE7+MsOTMx/DZcXBmSX6gYwI1RQY5/ido=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":309503},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"5ab38cbbff6ce87725cdc5f5baad471eec513798","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"node ./scripts/jest.js","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.17.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.19.0","dependencies":{"terser":"^5.51.0","jest-worker":"^27.4.5","schema-utils":"^4.3.3","@jridgewell/trace-mapping":"^0.3.31"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.1.1","csso":"^5.0.5","jest":"^30.4.2","svgo":"^4.0.0","husky":"^9.1.7","memfs":"^4.68.1","sharp":"^0.35.0","cspell":"^10.1.1","eslint":"^10.9.1","cssnano":"^8.0.9","del-cli":"^7.0.0","esbuild":"^0.28.2","postcss":"^8.5.26","webpack":"^5.109.2","@swc/css":"^0.0.28","imagemin":"^9.0.1","prettier":"^3.9.6","@swc/core":"^1.16.1","@swc/html":"^1.16.1","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.28.6","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.29.0","@types/csso":"^5.0.5","@types/node":"^26.3.0","file-loader":"^6.2.0","lint-staged":"^17.3.0","npm-run-all":"^4.1.5","webpack-cli":"^7.2.2","lightningcss":"^1.33.0","imagemin-svgo":"^12.0.0","worker-loader":"^3.0.8","@napi-rs/image":"^1.14.0","@changesets/cli":"^3.0.1","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.18.1","copy-webpack-plugin":"^14.0.0","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.1.0","eslint-config-webpack":"^4.9.6","@changesets/get-github-info":"^1.0.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.4"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"svgo":{"optional":true},"sharp":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"imagemin":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@napi-rs/image":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.9.0_1788424076531_0.5283429814802914","host":"s3://npm-registry-packages-npm-production"}},"5.10.0":{"name":"minimizer-webpack-plugin","version":"5.10.0","keywords":["avif","clean-css","compress","compressor","css","cssnano","csso","esbuild","html","html-minifier","html-minifier-terser","image","imagemin","images","jpeg","lightningcss","min","minification","minifier","minify","napi","optimize","optimizer","png","sharp","svg","svgo","swc","terser","uglify","uglify-es","uglify-js","webp","webpack","webpack-plugin"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.10.0","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"6c2b98613c1934a4877c1e09a0257f9d686f46ea","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.10.0.tgz","fileCount":14,"integrity":"sha512-2//60T4S0X1Ug/dqLDOgDaGlZsN1Lv8hf8oB0NOV/KIHSaXlPwXBBIbim79dE2Z7NEs52ES8YHoSv6Lmsk+XNg==","signatures":[{"sig":"MEYCIQC0QdoNgVALGhW+z3/E45un+PR90zFCvTw56Ml/EwwiNQIhAIYEGWBrOYTl54D6ddTDOjY7OBOwOvqgyVI30fmawbgk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDuw3/qTMeU4Hbvxm0X5vvggEvNafFL1U8HCwmEa6dutQIgFoUGBsA0pbKRmxVtGt6pBmGZMVRDiwdlxzc3RAIqtFI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.10.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":391710},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"649b48df3d2bcef8f6e71b41ade7e89590725761","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"node ./scripts/jest.js","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.19.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.20.0","dependencies":{"terser":"^5.51.0","jest-worker":"^27.4.5","schema-utils":"^4.3.3","@jridgewell/trace-mapping":"^0.3.31"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.1.1","csso":"^5.0.5","jest":"^30.4.2","svgo":"^4.0.0","husky":"^9.1.7","memfs":"^4.68.1","sharp":"^0.35.0","cspell":"^10.1.1","eslint":"^10.9.1","cssnano":"^8.0.9","del-cli":"^7.0.0","esbuild":"^0.28.2","postcss":"^8.5.26","webpack":"^5.109.2","@swc/css":"^0.0.28","imagemin":"^9.0.1","prettier":"^3.9.6","@swc/core":"^1.16.1","@swc/html":"^1.16.1","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.28.6","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.29.0","@types/csso":"^5.0.5","@types/node":"^26.3.0","file-loader":"^6.2.0","lint-staged":"^17.3.0","npm-run-all":"^4.1.5","webpack-cli":"^7.2.2","lightningcss":"^1.33.0","imagemin-svgo":"^12.0.0","worker-loader":"^3.0.8","@napi-rs/image":"^1.14.0","@changesets/cli":"^3.0.1","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.18.1","copy-webpack-plugin":"^14.0.0","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.1.0","eslint-config-webpack":"^4.9.6","@changesets/get-github-info":"^1.0.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.4"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"svgo":{"optional":true},"sharp":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"imagemin":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@napi-rs/image":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.10.0_1788699915107_0.3730683726832402","host":"s3://npm-registry-packages-npm-production"}},"5.10.1":{"name":"minimizer-webpack-plugin","version":"5.10.1","keywords":["avif","clean-css","compress","compressor","css","cssnano","csso","esbuild","html","html-minifier","html-minifier-terser","image","imagemin","images","jpeg","lightningcss","min","minification","minifier","minify","napi","optimize","optimizer","png","sharp","svg","svgo","swc","terser","uglify","uglify-es","uglify-js","webp","webpack","webpack-plugin"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.10.1","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"333ad27a53fcd51bbd868252a4733ee08480b021","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.10.1.tgz","fileCount":14,"integrity":"sha512-+dsZEyTcy1lkq41lxdiOqvb26gXbYGgwY+30w37f9PqUVkuEBejBLDotsHOTjuga9xJyGLW2DqzKDUyJ4W/PMQ==","signatures":[{"sig":"MEYCIQDjBLgmJ//l+lpmMQ9PqDfQZiuwzsMRFU1dUBCps5bc3gIhAPU1MfGMJ08hUB78eCzUbVbQ9D93hbYa4kr8kS5AUad5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIAPPFJK2ZeGdDkrBFE0dm0BzRBhTWmz7rmEM78MN7vpbAiAWDEoOgy232W6vxcrGmfHrcF/qcDA3TTt+dfhyMFF04A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.10.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":391890},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"efba39311b924beec51982456254cb38097322d2","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"node ./scripts/jest.js","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.19.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.20.0","dependencies":{"terser":"^5.51.0","jest-worker":"^27.4.5","schema-utils":"^4.3.3","@jridgewell/trace-mapping":"^0.3.31"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.1.1","csso":"^5.0.5","jest":"^30.4.2","svgo":"^4.0.0","husky":"^9.1.7","memfs":"^4.68.1","sharp":"^0.35.0","cspell":"^10.1.1","eslint":"^10.9.1","cssnano":"^8.0.9","del-cli":"^7.0.0","esbuild":"^0.28.2","postcss":"^8.5.26","webpack":"^5.109.2","@swc/css":"^0.0.28","imagemin":"^9.0.1","prettier":"^3.9.6","@swc/core":"^1.16.1","@swc/html":"^1.16.1","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.28.6","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.29.0","@types/csso":"^5.0.5","@types/node":"^26.3.0","file-loader":"^6.2.0","lint-staged":"^17.3.0","npm-run-all":"^4.1.5","webpack-cli":"^7.2.2","lightningcss":"^1.33.0","imagemin-svgo":"^12.0.0","worker-loader":"^3.0.8","@napi-rs/image":"^1.14.0","@changesets/cli":"^3.0.1","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.18.1","copy-webpack-plugin":"^14.0.0","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.1.0","eslint-config-webpack":"^4.9.6","@changesets/get-github-info":"^1.0.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.4"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"svgo":{"optional":true},"sharp":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"imagemin":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@napi-rs/image":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.10.1_1788957883117_0.48480399961609444","host":"s3://npm-registry-packages-npm-production"}},"5.11.0":{"name":"minimizer-webpack-plugin","version":"5.11.0","keywords":["avif","clean-css","compress","compressor","css","cssnano","csso","esbuild","html","html-minifier","html-minifier-terser","image","imagemin","images","jpeg","lightningcss","min","minification","minifier","minify","napi","optimize","optimizer","png","sharp","svg","svgo","swc","terser","uglify","uglify-es","uglify-js","webp","webpack","webpack-plugin"],"author":{"name":"webpack Contrib Team"},"license":"MIT","_id":"minimizer-webpack-plugin@5.11.0","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"homepage":"https://github.com/webpack/minimizer-webpack-plugin","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"ffc2934e639c4bdc88dd2391b39342525c59e1bc","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.11.0.tgz","fileCount":14,"integrity":"sha512-2JVy2DY+iBtfRyrQB5cRM7lfurnJIi6jFTgLip/7FxDu0WxswrIRzr4fBySQ0X7HqM7BcwE28zm+HfQ5V6y4Cg==","signatures":[{"sig":"MEUCIQDK7Ok577nhHB33WcRgdpECxb6Xr4MCWfWy8p513zk10wIgGUw8WgZAkf8+HKlPO6UrCLDsyV+3VEetwCCHZ7hCQik=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQC3rJFLRKnWI09ZPAGKg08xQn7RFT4ysKyGo+weKVu62QIhANAumHOp3I2OsV7rBrkCEYkgJ/5vwa0O2UlcFPCzYufS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.11.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":434892},"main":"dist/index.js","types":"types/index.d.ts","engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"1cf49b0f4ee8fa7540d0d971b070be8b2528dba9","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"node ./scripts/jest.js","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.19.0","description":"Minimizer plugin for webpack","directories":{},"_nodeVersion":"24.20.0","dependencies":{"terser":"^5.51.0","jest-worker":"^27.4.5","schema-utils":"^4.3.3","@jridgewell/trace-mapping":"^0.3.31"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.1.1","csso":"^5.0.5","jest":"^30.4.2","svgo":"^4.0.0","husky":"^9.1.7","memfs":"^4.68.1","sharp":"^0.35.0","cspell":"^10.1.1","eslint":"^10.9.1","cssnano":"^8.0.9","del-cli":"^7.0.0","esbuild":"^0.28.2","postcss":"^8.5.26","webpack":"^5.109.2","@swc/css":"^0.0.28","imagemin":"^9.0.1","prettier":"^3.9.6","@swc/core":"^1.16.1","@swc/html":"^1.16.1","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.28.6","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.29.0","@types/csso":"^5.0.5","@types/node":"^26.3.0","file-loader":"^6.2.0","lint-staged":"^17.3.0","npm-run-all":"^4.1.5","webpack-cli":"^7.2.2","lightningcss":"^1.33.0","imagemin-svgo":"^12.0.0","worker-loader":"^3.0.8","@napi-rs/image":"^1.14.0","@changesets/cli":"^3.0.1","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.18.1","copy-webpack-plugin":"^14.0.0","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.1.0","eslint-config-webpack":"^4.9.6","@changesets/get-github-info":"^1.0.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.4"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"svgo":{"optional":true},"sharp":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"imagemin":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@napi-rs/image":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/minimizer-webpack-plugin_5.11.0_1789822940213_0.18955146500019415","host":"s3://npm-registry-packages-npm-production"}},"5.12.0":{"_id":"minimizer-webpack-plugin@5.12.0","bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"dist":{"shasum":"acef4a0bd3c5ee405f767a9d90e0173b55b16458","tarball":"https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.12.0.tgz","fileCount":16,"integrity":"sha512-PCN1x1OzFeFB2GlP91s46q7Gz8Jf16Z7M45bzpoqrYZlh12QeY6tYVM5h299wbwy1DxnQ69VFmmh8Hb2Ff8mbw==","signatures":[{"sig":"MEYCIQD7ePSIzx5NWgn2jW0LIItlNgsG1gqE8KG+rjTpmLblUAIhAJtulJ00TbGH3ZAieJJ96IFqNuJ7YedUALTA116RiUkK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEHc4sMwko9lf03Lmm8tPX7Ga11kFU+HkwZ1BA5PYvmnAiBSovgUJlp8K1z7jh1T5DDZjhn792Qxkpep6G1/zo8SCg=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/minimizer-webpack-plugin@5.12.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":455689},"main":"dist/index.js","name":"minimizer-webpack-plugin","types":"types/index.d.ts","author":{"name":"webpack Contrib Team"},"engines":{"node":">= 10.13.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"0039e4cb9839b2c1f8e477fc3c80705766045293","license":"MIT","scripts":{"fix":"npm-run-all -l fix:code fix:prettier","lint":"npm-run-all -l -p \"lint:**\"","test":"npm run test:coverage","build":"npm-run-all -p \"build:**\"","clean":"del-cli dist types","prepare":"husky && npm run build","pretest":"npm run lint","release":"npm run build && changeset publish","version":"changeset version","fix:code":"npm run lint:code -- --fix","prebuild":"npm run clean","security":"npm audit --production","lint:code":"eslint --cache .","test:base":"node ./scripts/jest.js","build:code":"babel src -d dist --copy-files","lint:types":"tsc --pretty --noEmit","test:watch":"npm run test:base -- --watch","build:types":"tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write","fix:prettier":"npm run lint:prettier -- --write","lint:prettier":"prettier --list-different .","lint:spelling":"cspell \"**/*.*\"","test:coverage":"npm run test:base -- --collectCoverageFrom=\"src/**/*.js\" --coverage","lint:serialize-javascript":"node ./scripts/copy-serialize-javascript.js --check","build:serialize-javascript":"node ./scripts/copy-serialize-javascript.js"},"version":"5.12.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:77bec6bb-2a69-4be4-9a22-713f95e8f6e2"}},"homepage":"https://github.com/webpack/minimizer-webpack-plugin","keywords":["avif","clean-css","compress","compressor","css","cssnano","csso","esbuild","html","html-minifier","html-minifier-terser","image","imagemin","images","jpeg","lightningcss","min","minification","minifier","minify","napi","optimize","optimizer","png","sharp","svg","svgo","swc","terser","uglify","uglify-es","uglify-js","webp","webpack","webpack-plugin"],"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"_npmVersion":"11.19.0","description":"Minimizer plugin for webpack","directories":{},"maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"_nodeVersion":"24.21.0","dependencies":{"terser":"^5.51.0","jest-worker":"^27.4.5","schema-utils":"^4.3.3","@jridgewell/trace-mapping":"^0.3.31"},"_hasShrinkwrap":false,"devDependencies":{"del":"^6.1.1","csso":"^5.0.5","jest":"^30.4.2","svgo":"^4.0.0","husky":"^9.1.7","memfs":"^4.68.1","sharp":"^0.35.0","cspell":"^10.1.1","eslint":"^10.9.1","cssnano":"^8.0.9","del-cli":"^7.0.0","esbuild":"^0.28.2","postcss":"^8.5.26","webpack":"^5.109.2","@swc/css":"^0.0.28","imagemin":"^9.0.1","prettier":"^3.9.6","@swc/core":"^1.16.1","@swc/html":"^1.16.1","clean-css":"^5.3.3","uglify-js":"^3.19.3","@babel/cli":"^7.28.6","prettier-2":"npm:prettier@^2","typescript":"^6.0.3","@babel/core":"^7.29.0","@types/csso":"^5.0.5","@types/node":"^26.3.0","file-loader":"^6.2.0","lint-staged":"^17.3.0","npm-run-all":"^4.1.5","webpack-cli":"^7.2.2","lightningcss":"^1.33.0","imagemin-svgo":"^12.0.0","worker-loader":"^3.0.8","@napi-rs/image":"^1.14.0","@changesets/cli":"^3.0.1","@types/clean-css":"^4.2.11","@types/uglify-js":"^3.17.5","@babel/preset-env":"^7.29.5","@minify-html/node":"^0.18.1","copy-webpack-plugin":"^14.0.0","html-minifier-terser":"^7.2.0","serialize-javascript":"^7.1.0","eslint-config-webpack":"^4.9.6","@changesets/get-github-info":"^1.0.0","@types/html-minifier-terser":"^7.0.2","@types/serialize-javascript":"^5.0.4"},"peerDependencies":{"webpack":"^5.1.0"},"peerDependenciesMeta":{"csso":{"optional":true},"svgo":{"optional":true},"sharp":{"optional":true},"cssnano":{"optional":true},"esbuild":{"optional":true},"postcss":{"optional":true},"@swc/css":{"optional":true},"imagemin":{"optional":true},"@swc/core":{"optional":true},"@swc/html":{"optional":true},"clean-css":{"optional":true},"uglify-js":{"optional":true},"lightningcss":{"optional":true},"@napi-rs/image":{"optional":true},"@minify-html/node":{"optional":true},"html-minifier-terser":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/minimizer-webpack-plugin_5.12.0_1790256698854_0.2564790542276587"}}},"time":{"created":"2026-05-08T15:56:02.767Z","modified":"2026-09-24T13:31:39.337Z","0.0.1":"2026-05-08T15:56:02.890Z","5.6.0":"2026-05-08T17:20:46.055Z","5.6.1":"2026-05-27T17:31:23.783Z","5.7.0":"2026-08-26T19:33:07.916Z","5.8.0":"2026-08-27T11:16:42.043Z","5.9.0":"2026-09-03T08:27:56.623Z","5.10.0":"2026-09-06T13:05:15.196Z","5.10.1":"2026-09-09T12:44:43.206Z","5.11.0":"2026-09-19T13:02:20.311Z","5.12.0":"2026-09-24T13:31:38.964Z"},"bugs":{"url":"https://github.com/webpack/minimizer-webpack-plugin/issues"},"author":{"name":"webpack Contrib Team"},"license":"MIT","homepage":"https://github.com/webpack/minimizer-webpack-plugin","keywords":["avif","clean-css","compress","compressor","css","cssnano","csso","esbuild","html","html-minifier","html-minifier-terser","image","imagemin","images","jpeg","lightningcss","min","minification","minifier","minify","napi","optimize","optimizer","png","sharp","svg","svgo","swc","terser","uglify","uglify-es","uglify-js","webp","webpack","webpack-plugin"],"repository":{"url":"git+https://github.com/webpack/minimizer-webpack-plugin.git","type":"git"},"description":"Minimizer plugin for webpack","maintainers":[{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"}],"readme":"<div align=\"center\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n  </a>\n</div>\n\n[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![tests][tests]][tests-url]\n[![cover][cover]][cover-url]\n[![discussion][discussion]][discussion-url]\n[![size][size]][size-url]\n\n# minimizer-webpack-plugin\n\nThis plugin minifies your assets in a webpack build. It ships with several\nbuilt-in minimizers covering JavaScript, JSON, HTML, CSS, and images — pick one\nwith the [`minify`](#minify) option and target the right files with\n[`test`](#test).\n\nJavaScript minimizers:\n\n- [`terser`](https://github.com/terser/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.\n- [`uglify-js`](https://github.com/mishoo/UglifyJS) — `MinimizerPlugin.uglifyJsMinify`. ES5-only minifier, useful when you specifically need UglifyJS-compatible output. Requires `npm install --save-dev uglify-js`.\n- [`@swc/core`](https://github.com/swc-project/swc) — `MinimizerPlugin.swcMinify`. A very fast Rust-based JavaScript/TypeScript minifier. Requires `npm install --save-dev @swc/core`.\n- [`esbuild`](https://github.com/evanw/esbuild) — `MinimizerPlugin.esbuildMinify`. An extremely fast JS bundler/minifier; legal comments are always preserved (no `extractComments` support). Requires `npm install --save-dev esbuild`.\n\nJSON minimizer:\n\n- `JSON.stringify` — `MinimizerPlugin.jsonMinify`. Built in (no extra dependency); supports `space` and `replacer` options.\n\nHTML minimizers:\n\n- webpack's own — `webpack.html.syntax.htmlMinify`. Ships with webpack (`>= 5.111.0`), so it needs no extra dependency, and it is the one that minifies what a document nests: an inline `<style>`, every `style=\"\"`, a `<script>`, an `<svg>` subtree. See [webpack's own minimizers](#webpacks-own-minimizers).\n- [`html-minifier-terser`](https://github.com/terser/html-minifier-terser) — `MinimizerPlugin.htmlMinifierTerser`. JavaScript-based, no native dependency. Requires `npm install --save-dev html-minifier-terser`.\n- [`@swc/html`](https://github.com/swc-project/swc) — `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`.\n- [`@minify-html/node`](https://github.com/wilsonzlin/minify-html) — `MinimizerPlugin.minifyHtmlNode`. A Rust HTML minifier optimised for speed and effectiveness. Requires `npm install --save-dev @minify-html/node`.\n\nCSS minimizers:\n\n- webpack's own — `webpack.css.syntax.cssMinify`. Ships with webpack (`>= 5.111.0`), so it needs no extra dependency, and it minifies the CSS a stylesheet or a document nests. See [webpack's own minimizers](#webpacks-own-minimizers).\n- [`cssnano`](https://cssnano.github.io/cssnano/) — `MinimizerPlugin.cssnanoMinify`. Built on top of [PostCSS](https://postcss.org/). Requires `npm install --save-dev cssnano postcss`.\n- [`csso`](https://github.com/css/csso) — `MinimizerPlugin.cssoMinify`. A CSS minifier with structural optimisations. Requires `npm install --save-dev csso`.\n- [`clean-css`](https://github.com/clean-css/clean-css) — `MinimizerPlugin.cleanCssMinify`. A widely-used CSS optimiser. Requires `npm install --save-dev clean-css`.\n- [`esbuild`](https://github.com/evanw/esbuild) — `MinimizerPlugin.esbuildMinifyCss`. Very fast CSS minification using esbuild's CSS loader. Requires `npm install --save-dev esbuild`.\n- [`lightningcss`](https://github.com/parcel-bundler/lightningcss) — `MinimizerPlugin.lightningCssMinify`. A Rust-based CSS parser, transformer, and minifier. Requires `npm install --save-dev lightningcss`.\n- [`@swc/css`](https://github.com/swc-project/swc) — `MinimizerPlugin.swcMinifyCss`. A very fast Rust-based CSS minifier. Requires `npm install --save-dev @swc/css`.\n\nImage minimizers:\n\n- [`sharp`](https://github.com/lovell/sharp) — `MinimizerPlugin.sharpMinify`. Re-encodes an image as the format its name already claims (`avif`, `gif`, `heif`, `jp2`, `jpeg`, `png`, `tiff`, `webp`), and can resize, rotate, flip, grayscale, blur or sharpen on the way — from the options or from the asset's own name. Requires `npm install --save-dev sharp`.\n- [`svgo`](https://github.com/svg/svgo) — `MinimizerPlugin.svgoMinify`. Minifies SVG, including an `asset/inline` SVG that no `test` can match. Requires `npm install --save-dev svgo`.\n- [`imagemin`](https://github.com/imagemin/imagemin) — `MinimizerPlugin.imageminMinify`. Runs the `imagemin` plugins you name. Requires `npm install --save-dev imagemin` plus each plugin. Pair it with `MinimizerPlugin.imageminGenerate` under [`generate`](#generate) when a plugin converts the format, since only that can rename the asset.\n- [`@napi-rs/image`](https://github.com/Brooooooklyn/Image) — `MinimizerPlugin.napiRsImageMinify`. Rust codecs with no system dependency; recompresses `png` losslessly with oxipng and `jpeg` with mozjpeg, and can resize, turn, mirror, grayscale, invert or blur on the way — from the options or from the asset's own name. Requires `npm install --save-dev @napi-rs/image`.\n\nThese only minify — they never change an image's format or name; see\n[Images](#images).\n\nTransport encodings:\n\n- `zlib` and anything shaped like it — `MinimizerPlugin.compress`. Compresses an\n  asset so a server can serve it under `Content-Encoding`. Takes `algorithm` — a\n  `zlib` function's name (`gzip`, `brotliCompress`, `deflate`, `zstdCompress`, …)\n  or one of your own — and `compressionOptions` for it, and needs no extra\n  dependency. Give it to [`minify`](#minify) to compress an asset **in place**,\n  or to [`generate`](#generate) as an `asset` generator to write the compressed\n  file **beside** the original; either way it puts itself after the minimizers,\n  through a `getStage` of its own.\n\nAll of the non-default minimizers are declared as **optional** peer\ndependencies — install only the ones you actually use. One plugin instance\ncovers several languages at once: give [`minify`](#minify) an array and each\nminimizer is offered only the assets its own `filter` accepts, so JS, CSS,\nHTML and JSON share a single worker pool (see [Examples](#examples)).\n\n## Getting Started\n\nWebpack v5 comes with the latest `minimizer-webpack-plugin` out of the box.\nIf you are using Webpack v5 or above and wish to customize the options, you will still need to install `minimizer-webpack-plugin`.\nUsing Webpack v4, you have to install `terser-webpack-plugin` v4 (`minimizer-webpack-plugin` is only published for Webpack v5+).\n\nTo begin, you'll need to install `minimizer-webpack-plugin`:\n\n```console\nnpm install minimizer-webpack-plugin --save-dev\n```\n\nor\n\n```console\nyarn add -D minimizer-webpack-plugin\n```\n\nor\n\n```console\npnpm add -D minimizer-webpack-plugin\n```\n\nThen add the plugin to your `webpack` configuration. For example:\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [new MinimizerPlugin()],\n  },\n};\n```\n\nFinally, run `webpack` using the method you normally use (e.g., via CLI or an npm script).\n\n## Note about source maps\n\n**Works only with `source-map`, `inline-source-map`, `hidden-source-map` and `nosources-source-map` values for the [`devtool`](https://webpack.js.org/configuration/devtool/) option.**\n\nWhy?\n\n- `eval` wraps modules in `eval(\"string\")` and the minimizer does not handle strings.\n- `cheap` has no column information and the minimizer generates only a single line, which leaves only a single mapping.\n\nUsing supported `devtool` values enable source map generation.\n\n## Options\n\n- **[`test`](#test)**\n- **[`include`](#include)**\n- **[`exclude`](#exclude)**\n- **[`parallel`](#parallel)**\n- **[`minify`](#minify)**\n- **[`minimizerOptions`](#minimizeroptions)** (deprecated)\n- **[`generate`](#generate)**\n- **[`extractComments`](#extractcomments)**\n\n### `test`\n\nType:\n\n```ts\ntype test = string | RegExp | (string | RegExp)[];\n```\n\nDefault: `/\\.m?js(\\?.*)?$/i`\n\nTest to match files against.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        test: /\\.js(\\?.*)?$/i,\n      }),\n    ],\n  },\n};\n```\n\n### `include`\n\nType:\n\n```ts\ntype include = string | RegExp | (string | RegExp)[];\n```\n\nDefault: `undefined`\n\nFiles to include.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        include: /\\/includes/,\n      }),\n    ],\n  },\n};\n```\n\n### `exclude`\n\nType:\n\n```ts\ntype exclude = string | RegExp | (string | RegExp)[];\n```\n\nDefault: `undefined`\n\nFiles to exclude.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        exclude: /\\/excludes/,\n      }),\n    ],\n  },\n};\n```\n\n### `parallel`\n\nType:\n\n```ts\ntype parallel = boolean | number;\n```\n\nDefault: `true`\n\nUse multi-process parallel running to improve the build speed.\n\nDefault number of concurrent runs: `os.cpus().length - 1` or `os.availableParallelism() - 1` (if this function is supported).\n\n> **Note**\n>\n> Parallelization can speedup your build significantly and is therefore **highly recommended**.\n\n> **Warning**\n>\n> 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)).\n\n#### `boolean`\n\nEnable/disable multi-process parallel running.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        parallel: true,\n      }),\n    ],\n  },\n};\n```\n\n#### `number`\n\nEnable multi-process parallel running and set number of concurrent runs.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        parallel: 4,\n      }),\n    ],\n  },\n};\n```\n\n### `minify`\n\nType:\n\n```ts\ntype minifyFn = (\n  input: Record<string, string | Buffer>,\n  sourceMap: import(\"@jridgewell/trace-mapping\").SourceMapInput | undefined,\n  minifyOptions: {\n    module?: boolean | undefined;\n    ecma?: import(\"terser\").ECMA | undefined;\n  },\n  extractComments:\n    | boolean\n    | \"all\"\n    | \"some\"\n    | RegExp\n    | ((\n        astNode: any,\n        comment: {\n          value: string;\n          type: \"comment1\" | \"comment2\" | \"comment3\" | \"comment4\";\n          pos: number;\n          line: number;\n          col: number;\n        },\n      ) => boolean)\n    | {\n        condition?:\n          | boolean\n          | \"all\"\n          | \"some\"\n          | RegExp\n          | ((\n              astNode: any,\n              comment: {\n                value: string;\n                type: \"comment1\" | \"comment2\" | \"comment3\" | \"comment4\";\n                pos: number;\n                line: number;\n                col: number;\n              },\n            ) => boolean)\n          | undefined;\n        filename?: string | ((fileData: any) => string) | undefined;\n        banner?:\n          string | boolean | ((commentsFile: string) => string) | undefined;\n      }\n    | undefined,\n) => Promise<{\n  code: string;\n  map?: import(\"@jridgewell/trace-mapping\").SourceMapInput | undefined;\n  errors?: (string | Error)[] | undefined;\n  warnings?: (string | Error)[] | undefined;\n  extractedComments?: string[] | undefined;\n}>;\n\ninterface minimizer {\n  implementation: minifyFn;\n  options?: Record<string, any>;\n}\n\ntype minify = minifyFn | (minifyFn | minimizer)[] | minimizer;\n// An empty array is nothing to minify.\n```\n\nDefault: `MinimizerPlugin.terserMinify`\n\nWhich minimizer runs, and the options it runs with. By default the plugin uses\n[terser](https://github.com/terser/terser); overriding it is also how you test\nan unpublished version or a fork. The default stands whether or not a\n[`generate`](#generate) was configured too, and so does [`test`](#test)'s: the\nJavaScript minifier and the names it reads are what this plugin is.\n\nNothing minifying is an **empty array** rather than a missing value, for an\ninstance whose whole job is its `generate`:\n\n```js\nnew MinimizerPlugin({\n  test: /.*/,\n  minify: [],\n  generate: {\n    implementation: MinimizerPlugin.compress,\n    options: { algorithm: \"gzip\" },\n    type: \"asset\",\n    filename: \"[path][base].gz\",\n  },\n});\n```\n\n`false` is not accepted. A list with nothing in it needs no guard at any of the\nplaces that run the minimizers — each simply does nothing — while a second kind\nof value does.\n\n> **Warning**\n>\n> **Always use `require` inside `minify` function when `parallel` option enabled**.\n\n#### `object`\n\nThe form to prefer: the minimizer and its own options in one place.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: MinimizerPlugin.swcMinify,\n          options: { mangle: false },\n        },\n      }),\n    ],\n  },\n};\n```\n\n`options` reaches the minify function as its third argument, and what it takes\nis that minimizer's own: Terser's\n[minify options](https://github.com/terser/terser#minify-options) for the\ndefault one, and the tables in\n[webpack's own minimizers](#webpacks-own-minimizers) for `cssMinify` and\n`htmlMinify`.\n\n`implementation` may also name a **module path** rather than hold the function\nitself — a string, or `{ path, export }` for a named export, the way\n`sass-loader` takes its `implementation`. A worker then `require`s the\nminimizer, which is what the default terser is named by; one written as a\nfunction is handed over as source for the worker to rebuild with `new\nFunction`:\n\n```js\nnew MinimizerPlugin({\n  minify: {\n    // Or the string on its own, where the module exports the function itself.\n    implementation: {\n      path: require.resolve(\"./my-minifier\"),\n      export: \"minify\",\n    },\n  },\n});\n```\n\nThe saving is per task, so it needs every minimizer of that task to be nameable:\none written as a function anywhere in the list leaves the whole task on the\nsource path, since that function has no other way across. So does a function\nanywhere in what the task carries — an `extractComments` callback, or a\nminimizer's own options holding one — because a required minimizer is handed\nthe payload as it is, and a structured clone throws on a function.\n\n`filter(name, info)` states which assets this minimizer is offered — return\n`false` to decline one, and anything else (`undefined` included) to accept. It\nanswers for a `filter` property on the minimizer function itself, which is what\nthe built-ins carry, so setting it here is how you narrow one of them without\nwrapping it.\n\n```js\nnew MinimizerPlugin({\n  minify: {\n    implementation: MinimizerPlugin.sharpMinify,\n    options: { encodeOptions: { jpeg: { quality: 80 } } },\n    filter: (name) => !name.includes(\"do-not-touch\"),\n  },\n});\n```\n\nTwo keys are filled in before a minimizer sees them, and only when `options`\ndoes not set them itself: `ecma`, from\n[`output.environment`](https://webpack.js.org/configuration/output/#outputenvironment),\nand `module`, from the asset's own `javascriptModule` info or its `.mjs` /\n`.cjs` extension. Setting either yourself wins, including `module: false`.\n\n<details>\n<summary>The default minimizer's options, written out</summary>\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: MinimizerPlugin.terserMinify,\n          options: {\n            ecma: undefined,\n            parse: {},\n            compress: {},\n            mangle: true, // Note `mangle.properties` is `false` by default.\n            module: false,\n            // Deprecated\n            output: null,\n            format: null,\n            toplevel: false,\n            nameCache: null,\n            ie8: false,\n            keep_classnames: undefined,\n            keep_fnames: false,\n            safari10: false,\n          },\n        },\n      }),\n    ],\n  },\n};\n```\n\n</details>\n\n#### `array`\n\nSeveral minimizers are an array of objects, rather than one object holding two\nlists that have to line up. Each asset is dispatched to the minimizers whose\n`filter` accepts it, and when more than one accepts the same asset the output\nof each is fed to the next (the chain semantic). Warnings, errors and extracted\ncomments from all of them are merged.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: [\n          {\n            implementation: MinimizerPlugin.terserMinify,\n            options: { mangle: false },\n          },\n          { implementation: MinimizerPlugin.swcMinify },\n        ],\n      }),\n    ],\n  },\n};\n```\n\nEach entry carries its own `filter` as well as its own `options`, which is how\nthe same minimizer runs twice over different assets:\n\n```js\nnew MinimizerPlugin({\n  test: /\\.(jpe?g|png)$/i,\n  minify: [\n    {\n      implementation: MinimizerPlugin.sharpMinify,\n      options: { encodeOptions: { jpeg: { quality: 60 } } },\n      filter: (name) => name.includes(\"thumb\"),\n    },\n    {\n      implementation: MinimizerPlugin.sharpMinify,\n      options: { encodeOptions: { jpeg: { quality: 90 } } },\n      filter: (name) => !name.includes(\"thumb\"),\n    },\n  ],\n});\n```\n\nThis is also what lets **one plugin instance and one worker pool** handle every\nasset type: each built-in ships with a `filter` matching its natural\nextension, so JS, CSS, HTML and JSON need no second instance. `test` still\ndefaults to JS only, so widen it to let the other assets reach the dispatcher:\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        test: /\\.(?:[cm]?js|css|html?|json)(\\?.*)?$/i,\n        minify: [\n          { implementation: MinimizerPlugin.terserMinify },\n          { implementation: MinimizerPlugin.cssnanoMinify },\n          { implementation: MinimizerPlugin.htmlMinifierTerser },\n          { implementation: MinimizerPlugin.jsonMinify },\n        ],\n      }),\n    ],\n  },\n};\n```\n\nPair it with [webpack's own](#webpacks-own-minimizers) `cssMinify` and\n`htmlMinify` and the source a document or a stylesheet nests inside itself is\nminified too — see [Embedded source](#embedded-source).\n\n#### `function`\n\nA bare function is shorthand for an object with no `options`. A custom one\nsays what it can do through properties on the function itself — each optional,\nand each answering a question the plugin would otherwise have to guess at.\n\n**webpack.config.js**\n\n```js\n// Can be async\nconst minify = (input, sourceMap, minimizerOptions, extractsComments) => {\n  // Whatever the `minify` option's `options` holds reaches the third argument\n  // You can use `minimizerOptions.myCustomOption`\n\n  // Custom logic for extract comments\n  const { map, code } = require(\"uglify-module\") // Or require('./path/to/uglify-module')\n    .minify(input, {/* Your options for minification */});\n\n  return { map, code, warnings: [], errors: [], extractedComments: [] };\n};\n\n// Used to regenerate `fullhash`/`chunkhash` between different implementation\n// Example: you fix a bug in custom minimizer/custom function, but unfortunately webpack doesn't know about it, so you will get the same fullhash/chunkhash\n// to avoid this you can provide version of your custom minimizer\n// You don't need if you use only `contenthash`\nminify.getMinimizerVersion = () => {\n  let packageJson;\n\n  try {\n    packageJson = require(\"uglify-module/package.json\");\n  } catch (error) {\n    // Ignore\n  }\n\n  return packageJson && packageJson.version;\n};\n\n// Restrict the minimizer to the assets it can actually handle. The plugin\n// skips assets for which `filter` returns `false` and (when an array of\n// minimizers is used) dispatches each asset only to the minimizers that\n// accept it. Returning `undefined` is treated as accept.\nminify.filter = (name) => /\\.[cm]?js(\\?.*)?$/i.test(name);\n\n// The languages this minimizer minifies. Source a module embeds in another\n// language carries no filename, so `filter` cannot dispatch it and this does\n// — a function without it is never handed any.\nminify.getTypes = () => [\"javascript\"];\n\n// Declare this when the minimizer reads the asset's bytes rather than its\n// text — an image minimizer. Its `input` values then arrive as a `Buffer` and\n// its `code` may be one. Only applied when every minimizer an asset is\n// dispatched to declares it, since one that does not could not read the bytes.\nminify.supportsBinary = () => true;\n\n// Declare this when the minimizer has to run somewhere other than where\n// minification does — it is handed the `Compilation` class so it can name a\n// stage rather than a number. Each minimizer runs where it asks, chaining\n// through the asset a later one reads back; one asking for nothing runs where\n// minifying belongs.\nminify.getStage = (compilation) =>\n  compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER;\n\n// The name this function's work goes under: the asset it writes is marked\n// with it in the asset info, and stats print it. A minimizer declaring\n// nothing minified the asset, so `minimized`; a generator declaring nothing\n// wrote a new file, so `generated`. It is also what is not run twice — an\n// asset already marked with every name a function writes is declined, which\n// is how one minified by a child compilation is left alone.\nminify.getAssetFlag = () => \"compressed\";\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: minify,\n          options: { myCustomOption: true },\n        },\n      }),\n    ],\n  },\n};\n```\n\nA minifier that **nests other languages inside what it prints** — a document\nwith an inline `<style>`, a stylesheet with a `data:` URL — hands each nested\nbody out instead of minifying it itself. It declares which languages it can\noffer, and the plugin passes `renderEmbeddedSource` in its options when\nsomething else claims one of them:\n\n```js\nasync function myHtmlMinify(input, sourceMap, minimizerOptions) {\n  const [[, code]] = Object.entries(input);\n  const { renderEmbeddedSource } = minimizerOptions;\n\n  // Absent when nothing configured claims a language this minifier offers\n  const minifyStyle = async (css) => {\n    const result = renderEmbeddedSource\n      ? await renderEmbeddedSource(css, { type: \"css\" })\n      : undefined;\n\n    // Declining leaves the body exactly as it was written\n    return result && typeof result.code === \"string\" ? result.code : css;\n  };\n\n  return { code: await print(code, minifyStyle) };\n}\n\n// The languages this minifier can hand out, given the options it will run with\nmyHtmlMinify.getEmbeddedTypes = (minimizerOptions) => [\"css\", \"javascript\"];\n```\n\n`renderEmbeddedSource(source, { type, as })` answers\n`{ code?, warnings?, errors? }` or `undefined`, and recurses — a body that\nnests something of its own is reached too. `as` says which production of\n`type` the body is; a `style=\"\"` is `\"block-contents\"` rather than a whole\nstylesheet. [Embedded source](#embedded-source) has the whole picture.\n\n### `minimizerOptions`\n\n> **Note**\n>\n> **Deprecated**, and to be removed in the next major release. Give a\n> minimizer its options in [`minify`](#minify) instead, which keeps one\n> minimizer's configuration in one place. It keeps working, and setting the\n> options for one minimizer in both places is an error.\n\nType:\n\n```ts\ntype minimizerOptions = Record<string, any> | Record<string, any>[];\n```\n\nDefault: [Terser's](https://github.com/terser/terser#minify-options)\n\nOptions for the active minimizer, given away from it. With an array of\nminimizers it may be an array too — each element goes to the minimizer at the\nsame index — or one object every minimizer is handed. It is still the only way\nto configure the **default** minimizer without naming it:\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [new MinimizerPlugin({ minimizerOptions: { mangle: false } })],\n  },\n};\n```\n\n`terserOptions` is a deprecated alias of it — passing either is equivalent, and\n`minimizerOptions` wins if both are set.\n\n### `generate`\n\nType:\n\n```ts\ntype generateFn = (\n  input: Record<string, string | Buffer>,\n  sourceMap: undefined,\n  generatorOptions: Record<string, any>,\n) => Promise<{\n  code: string | Buffer;\n  filename?: string;\n  errors?: (Error | string)[];\n  warnings?: (Error | string)[];\n}>;\n\ninterface generator {\n  implementation: generateFn;\n  options?: Record<string, any>;\n  type?: \"import\" | \"asset\";\n  filename?: string | ((pathData: any) => string);\n  filter?: (name: string) => boolean;\n  deleteOriginalAssets?: boolean | ((name: string) => boolean);\n  threshold?: number;\n  minRatio?: number;\n  relatedName?: string | false;\n}\n\ntype generate =\n  | generateFn\n  | generateFn[]\n  | generator\n  | Record<string, generateFn | generateFn[] | generator>;\n```\n\nDefault: `undefined`\n\nRewrites a module's own bytes **as it is built**, rather than an asset after\nthe build. That is the one point at which a re-encoding can also **rename** —\nreturn a `filename` and the asset is emitted under it, with every reference in\nthe bundle following. [`minify`](#minify) cannot: an asset's name is decided\nduring code generation, so renaming there would leave the bundle pointing at a\nURL nothing emits.\n\n[`test`](#test), [`include`](#include) and [`exclude`](#exclude) select which\nmodules it sees, matched against the module's resource — query and all, so\n`?as=webp` is matchable. A generator runs **in the webpack process**, since\nmodules build before the worker pool is up, and its answer is cached under the\nbytes plus the generator and its options.\n\nTwo generators ship with the plugin, and they differ in who picks the format.\n`sharpGenerate` is told: it takes the target from the request's `?as=` or,\nfailing that, from an `options.encodeOptions` naming exactly one format, and reports an error when neither says which format\nto write. `imageminGenerate` is not: its plugins decide, so it reads the format\nback off the bytes they produced and renames to match, leaving an asset its\nplugins did not convert under the name it had.\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.(jpe?g|png)$/i,\n        type: \"asset/resource\",\n        // The query has to survive into the name, or two formats of one image\n        // collide.\n        generator: { filename: \"[name][ext][query]\" },\n      },\n    ],\n  },\n  plugins: [\n    new MinimizerPlugin({\n      test: /\\.(jpe?g|png)$/i,\n      generate: MinimizerPlugin.sharpGenerate,\n    }),\n  ],\n};\n```\n\n```js\n// `image.jpg` is emitted as `image.webp`, and this import points at it.\nimport webp from \"./image.jpg?as=webp\";\n```\n\nWritten as an object, `generate` **names** its generators, and an asset picks\none by name with `?as=`:\n\n```js\nnew MinimizerPlugin({\n  test: /\\.(jpe?g|png)$/i,\n  generate: {\n    webp: {\n      implementation: MinimizerPlugin.sharpGenerate,\n      options: { encodeOptions: { webp: { quality: 90 } } },\n    },\n    avif: {\n      implementation: MinimizerPlugin.sharpGenerate,\n      options: { encodeOptions: { avif: { quality: 50 } } },\n    },\n  },\n});\n```\n\n```js\n// And `./image.jpg?as=avif` for the other one.\nimport webp from \"./image.jpg?as=webp\";\n```\n\nA module naming no preset is left alone, so the same build can import an image\nunconverted. One naming a preset nothing defines is an error rather than a\nsilent decline, since the name it asked for is what the bundle would point at.\n\nA generator can also be written as an object — on its own, or under a name —\nwhich is where its own options live and what lets it read what was **emitted**\ninstead of a module as it builds:\n\n```js\nnew MinimizerPlugin({\n  test: /\\.(jpe?g|png)$/i,\n  generate: {\n    webp: {\n      implementation: MinimizerPlugin.sharpGenerate,\n      options: { encodeOptions: { webp: {} } },\n      type: \"asset\",\n      // Optional, a template or a function answering with one. Without it the\n      // generator's own name for the result is used, which for `sharpGenerate`\n      // is the original with its extension replaced.\n      filename: \"[path][name].webp\",\n      // Optional. Narrows what this generator reads, on top of `test`.\n      filter: (name) => !name.includes(\"icons/\"),\n      // Optional, `false` by default: the asset it read stays where it is.\n      // Written as a function it is asked per asset.\n      deleteOriginalAssets: false,\n      // Optional. Skips an asset this small, before the generator is asked.\n      threshold: 10240,\n      // Optional. Drops the result unless it is this much smaller than what\n      // it read, as `generated size / original size`.\n      minRatio: 0.8,\n      // Optional. The key the new file is recorded under in the original's\n      // `related` info, which is how a server asked for one finds the other.\n      relatedName: \"webp\",\n    },\n  },\n});\n```\n\n`type` decides which of the two things a generator does, and they are not\ninterchangeable — they read different input, at different points in the build:\n\n|                                | `\"import\"` (the default)                   | `\"asset\"`                                                                                       |\n| :----------------------------- | :----------------------------------------- | :---------------------------------------------------------------------------------------------- |\n| Reads                          | a module, **as it builds**                 | an asset, **once it is emitted**                                                                |\n| Produces                       | that module's own bytes, renamed with them | a **new file beside** the one it read                                                           |\n| Picked by                      | `?as=<name>` on the import                 | `test` / `include` / `exclude`, then `filter`                                                   |\n| Reaches a file nothing imports | no                                         | yes — copied assets included                                                                    |\n| Fields it reads                | `implementation`, `options`                | those plus `filename`, `filter`, `deleteOriginalAssets`, `threshold`, `minRatio`, `relatedName` |\n| webpack                        | **5.111** or newer                         | any supported version                                                                           |\n\n**`\"import\"`** is the only point at which a rename can reach the bundle: the\nasset is named while its module is built, so every reference follows it. The\nimport that asked for the conversion gets the converted file.\n\n```js\nnew MinimizerPlugin({\n  test: /\\.(jpe?g|png)$/i,\n  generate: { webp: { implementation: MinimizerPlugin.sharpGenerate } },\n});\n```\n\n```js\nimport url from \"./photo.jpg?as=webp\"; // url is \"photo.webp\"\n\nconst same = new URL(\"./photo.jpg?as=webp\", import.meta.url); // photo.webp\n```\n\n```css\n.hero {\n  background: url(\"./photo.jpg?as=webp\"); /* photo.webp */\n}\n```\n\n```\nphoto.webp    the jpg became this\n```\n\nThose are one asset module between them, so an `import`, a `new URL()` and a\nCSS `url()` all follow the rename. An asset inlined as a data URI carries no\nfile name, and takes the media type of what it became — `data:image/webp;…`.\n\n**`\"asset\"`** leaves what it read alone and writes another file next to it, so\nboth survive — the `<picture>` case, where the `.webp` goes in a `srcset` you\nwrite yourself and the `.jpg` stays as the fallback. Nothing imports the new\nfile, so `?as=` cannot reach it and its preset name selects nothing; the name\nis only how you address its options. An asset already generated is never\ngenerated from again.\n\n```js\nnew MinimizerPlugin({\n  test: /\\.(jpe?g|png)$/i,\n  generate: {\n    webp: { implementation: MinimizerPlugin.sharpGenerate, type: \"asset\" },\n  },\n});\n```\n\n```js\nimport url from \"./photo.jpg\"; // url is \"photo.jpg\", unchanged\n```\n\n```\nphoto.jpg     still there, unless `deleteOriginalAssets`\nphoto.webp    generated beside it\n```\n\n`filename`, `filter`, `deleteOriginalAssets`, `threshold`, `minRatio` and\n`relatedName` describe a file being written beside another, so they belong to\n`\"asset\"` and setting one on an `\"import\"` generator is an error rather than a\nfield that quietly does nothing.\n\nThree of them decide whether the new file is worth having. `threshold` skips an\nasset too small to bother with, before the generator is asked at all. `minRatio`\ndrops a result that is not enough smaller than what it read, since a file that\nsaves nothing still costs a request. `relatedName` records the new file under\nthat key in the original's `related` info — which is how a server asked for the\noriginal finds it — and declines an asset already carrying that key.\n\nA file written under the original's own name has replaced it, so there is\nnothing beside it to delete and nothing for `relatedName` to point at; a\ngenerator doing that re-encodes an asset in place.\n\nDeleting takes the original file and nothing else. webpack deletes whatever an\nasset's `related` names along with it, so a source map, or the file a second\ngenerator wrote beside the same original, would go too; the original goes\nalone instead. Where the generated file took the original's own name there is\nnothing left to delete, and `relatedName` is not recorded when the asset that\nwould carry it is being deleted.\n\nA generated file inherits nothing from the one it was read from: what the\noriginal's info says about its hashes, its module and where its source came\nfrom is true of that file and not of this one. The exception is `immutable`,\nand only where `filename` still derives from the original's name — `[name]`,\n`[base]` or `[file]` — since that is what carried the hash the promise rests\non.\n\n**When** a generator runs is not among them, because it is not the config's to\nsay: the implementation declares it through a `getStage` of its own, the way it\ndeclares everything else about itself — see [`minify`](#minify). Compressing has\nto read the bytes a user downloads, so `MinimizerPlugin.compress` asks for\n`PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER` and runs after every minimizer has had\nits say; one that asks for nothing runs where minifying does. The **name its\nwork goes under** is the implementation's too, through the same kind of helper:\na generator declaring nothing wrote a new file, so `generated`, while `compress`\nsays `compressed`, another encoding of the bytes being no smaller a version of\nthem. Whatever the name, stats print it and the generator declines a file\nalready carrying it, so nothing reads its own output back.\n\n`MinimizerPlugin.compress` ships with the plugin and is written against that.\n`algorithm` says which compression to run — a `zlib` function's name, or one of\nyour own taking `(input, options, callback)` — and `compressionOptions` is what\nthat algorithm is run with, the way `terserMinify` takes terser's own options.\nHere it is as an `asset` generator, which writes the compressed file beside the\none it read, so both survive and the URL says which is which:\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        test: /\\.(js|css|html|svg)$/i,\n        generate: {\n          gzip: {\n            implementation: MinimizerPlugin.compress,\n            options: { algorithm: \"gzip\" },\n            type: \"asset\",\n            filename: \"[path][base].gz\",\n          },\n          brotli: {\n            implementation: MinimizerPlugin.compress,\n            options: {\n              algorithm: \"brotliCompress\",\n              compressionOptions: { params: {} },\n            },\n            type: \"asset\",\n            filename: \"[path][base].br\",\n          },\n        },\n      }),\n    ],\n  },\n};\n```\n\nMinifying and compressing are then one plugin over one pass of filtering and one\ncache, and the ordering they need — compress what minification produced — is\nwhat `stage` states rather than what applying two plugins in the right order\nhappens to give. Each algorithm is run at its own maximum by default (`zlib`'s\nbest level, brotli's best quality); name `compressionOptions` to say otherwise.\n\n#### Compressing with minifying, and without\n\nThe example above does both: `minify` defaults to terser, so the bundle is\nminified and the compressed files are written from what minification produced.\nThat is the shape to want — one pass of filtering, one cache, and `stage`\nordering the two — and it needs nothing said about `minify` at all:\n\n```js\nnew MinimizerPlugin({\n  test: /\\.(js|css|html|svg)$/i,\n  generate: {\n    implementation: MinimizerPlugin.compress,\n    options: { algorithm: \"gzip\" },\n    type: \"asset\",\n    filename: \"[path][base].gz\",\n  },\n});\n```\n\nCompressing **only** — an instance that must not touch what it reads — says so\nwith an empty list of minimizers. `test` is then yours to state too, since the\n`.js` default belongs to minifying:\n\n```js\nnew MinimizerPlugin({\n  test: /.*/,\n  minify: [],\n  generate: {\n    implementation: MinimizerPlugin.compress,\n    options: { algorithm: \"gzip\" },\n    type: \"asset\",\n    filename: \"[path][base].gz\",\n  },\n});\n```\n\nNothing is minified, no asset is marked `minimized`, and the bundle keeps the\nname it would have had without this plugin — an instance that rewrites nothing\nsalts no hash.\n\nIt is an ordinary minimizer too, so [`minify`](#minify) takes it the way it\ntakes `terserMinify` or `swcMinify`. There it compresses the asset **in place**\nrather than beside it — the shape for a server that says what the encoding is\nthrough `Content-Encoding` while the URL stays as it was:\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        test: /\\.js$/i,\n        minify: MinimizerPlugin.compress,\n        minimizerOptions: { algorithm: \"gzip\" },\n      }),\n    ],\n  },\n};\n```\n\nAn array runs its minimizers in order, each one reading what the last produced,\nso minifying and then compressing in place is one entry after another — and each\nstates its own `options`. Each runs at the stage it asks for — terser before the\nhash is taken, `compress` after — so `[contenthash]` still names what\nminification produced:\n\n```js\nnew MinimizerPlugin({\n  test: /\\.js$/i,\n  minify: [\n    { implementation: MinimizerPlugin.terserMinify },\n    {\n      implementation: MinimizerPlugin.compress,\n      options: { algorithm: \"brotliCompress\" },\n    },\n  ],\n});\n```\n\n`ecma` is filled in from\n[`output.environment`](https://webpack.js.org/configuration/output/#outputenvironment)\nunless a generator's options set it, the same way it is for a minimizer's —\nsee [`minify`](#minify).\n\n`filename` is a\n[webpack filename template](https://webpack.js.org/configuration/output/#outputfilename)\nresolved against the asset read, so `[path]`, `[name]`, `[base]`, `[ext]` and\n`[query]` are available; content hashes are not, because the name derives from\none the original already carries.\n\nIn watch mode the rename is carried on the module rather than reapplied each\nbuild, so a rebuild that does not touch the image keeps pointing at the\ngenerated name without running the generator again. Changing the image does\nrun it again, since its answer is cached under the bytes.\n\nThe same holds across runs under\n[`cache.type: \"filesystem\"`](https://webpack.js.org/configuration/cache/#cachetype),\nwhere a module is restored from the pack rather than rebuilt. That restored\nresult is the generator's, so changing a generator or its options has to\ninvalidate the pack, and the plugin adds their identity to\n[`cache.version`](https://webpack.js.org/configuration/cache/#cacheversion) so\nit does. This needs the plugin to be in the config — `plugins` or\n`optimization.minimizer` — since webpack builds the cache while it applies\nthem; a plugin applied by hand after `webpack()` returns is too late to reach\nit, and a changed generator would then be ignored until the cache directory is\nremoved.\n\n> **Note**\n>\n> **Note**\n>\n> `generatorOptions` is kept as a deprecated way of giving a generator its\n> options — one object for one generator, an array positionally matching an\n> array of them, or keyed by name where `generate` names its generators. Prefer\n> a generator's own `options`. Setting both for one generator is an error, and\n> a key naming no generator is an error rather than silently doing nothing.\n\n> **Note**\n>\n> An `\"import\"` generator needs a webpack whose `NormalModule` `processResult`\n> hook can be awaited (**5.111** or newer), since that is where a rename has to\n> happen. On an older webpack the plugin reports an error rather than silently\n> generating nothing. An `\"asset\"` generator does not use that hook and works on\n> any supported webpack.\n\n### `extractComments`\n\nType:\n\n```ts\ntype extractComments =\n  | boolean\n  | string\n  | RegExp\n  | ((\n      astNode: any,\n      comment: {\n        value: string;\n        type: \"comment1\" | \"comment2\" | \"comment3\" | \"comment4\";\n        pos: number;\n        line: number;\n        col: number;\n      },\n    ) => boolean)\n  | {\n      condition?:\n        | boolean\n        | \"all\"\n        | \"some\"\n        | RegExp\n        | ((\n            astNode: any,\n            comment: {\n              value: string;\n              type: \"comment1\" | \"comment2\" | \"comment3\" | \"comment4\";\n              pos: number;\n              line: number;\n              col: number;\n            },\n          ) => boolean)\n        | undefined;\n      filename?: string | ((fileData: any) => string) | undefined;\n      banner?:\n        string | boolean | ((commentsFile: string) => string) | undefined;\n    };\n```\n\nDefault: `true`\n\nWhether comments shall be extracted to a separate file, (see [details](https://github.com/webpack/webpack/commit/71933e979e51c533b432658d5e37917f9e71595a)).\n\nBy default, extract only comments using `/^\\**!|@preserve|@license|@cc_on/i` RegExp condition and remove remaining comments.\n\nIf the original file is named `foo.js`, then the comments will be stored to `foo.js.LICENSE.txt`.\n\nA minimizer's `options.format.comments` specifies whether the comment will be preserved - i.e., it is possible to preserve some comments (e.g. annotations) while extracting others, or even preserve comments that have already been extracted.\n\n#### `boolean`\n\nEnable/disable extracting comments.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: true,\n      }),\n    ],\n  },\n};\n```\n\n#### `string`\n\nExtract `all` or `some` (use the `/^\\**!|@preserve|@license|@cc_on/i` RegExp) comments.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: \"all\",\n      }),\n    ],\n  },\n};\n```\n\n#### `RegExp`\n\nAll comments that match the given expression will be extracted to a separate file.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: /@extract/i,\n      }),\n    ],\n  },\n};\n```\n\n#### `function`\n\nAll comments that match the given expression will be extracted to a separate file.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: (astNode, comment) => {\n          if (/@extract/i.test(comment.value)) {\n            return true;\n          }\n\n          return false;\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `object`\n\nAllows you to customize condition for extracting comments, and specify the extracted file name and banner.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: {\n          condition: /^\\**!|@preserve|@license|@cc_on/i,\n          filename: (fileData) =>\n            // The \"fileData\" argument contains object with \"filename\", \"basename\", \"query\" and \"hash\"\n            `${fileData.filename}.LICENSE.txt${fileData.query}`,\n          banner: (licenseFile) =>\n            `License information can be found in ${licenseFile}`,\n        },\n      }),\n    ],\n  },\n};\n```\n\n##### `condition`\n\nType:\n\n```ts\ntype condition =\n  | boolean\n  | \"all\"\n  | \"some\"\n  | RegExp\n  | ((\n      astNode: any,\n      comment: {\n        value: string;\n        type: \"comment1\" | \"comment2\" | \"comment3\" | \"comment4\";\n        pos: number;\n        line: number;\n        col: number;\n      },\n    ) => boolean)\n  | undefined;\n```\n\nThe condition that determines which comments should be extracted.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: {\n          condition: \"some\",\n          filename: (fileData) =>\n            // The \"fileData\" argument contains object with \"filename\", \"basename\", \"query\" and \"hash\"\n            `${fileData.filename}.LICENSE.txt${fileData.query}`,\n          banner: (licenseFile) =>\n            `License information can be found in ${licenseFile}`,\n        },\n      }),\n    ],\n  },\n};\n```\n\n##### `filename`\n\nType:\n\n```ts\ntype filename = string | ((fileData: any) => string) | undefined;\n```\n\nDefault: `[file].LICENSE.txt[query]`\n\nAvailable placeholders: `[file]`, `[query]` and `[filebase]` (`[base]` for webpack 5).\n\nThe file where the extracted comments will be stored.\n\nDefault is to append the suffix `.LICENSE.txt` to the original filename.\n\n> **Warning**\n>\n> We highly recommend using the `.txt` extension. Using `.js`/`.cjs`/`.mjs` extensions may conflict with existing assets, which leads to broken code.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: {\n          condition: /^\\**!|@preserve|@license|@cc_on/i,\n          filename: \"extracted-comments.js\",\n          banner: (licenseFile) =>\n            `License information can be found in ${licenseFile}`,\n        },\n      }),\n    ],\n  },\n};\n```\n\n##### `banner`\n\nType:\n\n```ts\ntype banner = string | boolean | ((commentsFile: string) => string) | undefined;\n```\n\nDefault: `/*! For license information please see ${commentsFile} */`\n\nThe banner text that points to the extracted file and will be added at the top of the original file.\n\nIt can be `false` (no banner), a `String`, or a `function<(string) -> String>` that will be called with the filename where the extracted comments have been stored.\n\nThe banner will be wrapped in a comment.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        extractComments: {\n          condition: true,\n          filename: (fileData) =>\n            // The \"fileData\" argument contains object with \"filename\", \"basename\", \"query\" and \"hash\"\n            `${fileData.filename}.LICENSE.txt${fileData.query}`,\n          banner: (commentsFile) =>\n            `My custom banner about license information ${commentsFile}`,\n        },\n      }),\n    ],\n  },\n};\n```\n\n## Embedded source\n\nSource written in one language that reaches the bundle inside another is\nminified too, which no asset carries and an asset-level minimizer therefore\nnever sees. It needs no option (webpack `>= 5.110.0`; older versions reach only\nwhat an asset nests inside itself).\n\nSuch source has no filename, so `test` / `include` / `exclude` and each\nminimizer's `filter` — all of which match filenames — cannot dispatch it.\n**It is dispatched by the language it is written in**, which every minify\nfunction states for itself:\n\n```js\nmyCssMinifier.getTypes = () => [\"css\"];\n```\n\nwebpack's own `cssMinify` and `htmlMinify` declare `css` and `html`, and are\nthe two that hand out what they nest. The built-ins declare `javascript`\n(`terserMinify`, `uglifyJsMinify`, `swcMinify`, `esbuildMinify`), `css`\n(`cssnanoMinify`, `cssoMinify`, `cleanCssMinify`, `esbuildMinifyCss`,\n`lightningCssMinify`, `swcMinifyCss`), `html` (`htmlMinifierTerser`,\n`swcMinifyHtml`, `swcMinifyHtmlFragment`, `minifyHtmlNode`) and `json`\n(`jsonMinify`). A language **no configured minimizer\nclaims — `svg` out of the box — is emitted exactly as it was written**, and a\ncustom minify function without `getTypes` is never handed embedded source at\nall.\n\nWhat this reaches:\n\n- CSS and HTML a module embeds in a JavaScript string literal (every\n  `exportType` but `link`).\n- The text an `asset/source` module embeds, and the payload an `asset/inline`\n  module encodes — the payload before it is encoded, so the encoding covers\n  what came back. **A language written as text only**: an inline `svg` is\n  offered, an inline `png` or `jpeg` is not, so a raster image that becomes a\n  `data:` URI is minified by [`generate`](#generate) rather than here.\n- What a document or a stylesheet nests inside itself: an inline `<style>`,\n  every `style=\"\"`, a `<script>` holding JavaScript or JSON, an `<svg>` subtree,\n  the document an `<iframe srcdoc>` holds, and the payload of a `url()` `data:`\n  URL. This is how an inline `<script>` is minified by `terser` at all.\n\nA `style=\"\"` arrives as **`css` with `as: \"block-contents\"`** — the same word\n`module.parser.css.as` uses. It holds a block's contents rather than a whole\nstylesheet, so a minifier claiming `css` is handed one either way and `as` says\nwhich it is. Ignore it at your peril: parsing a declaration list as a stylesheet\nfinds no rule and returns nothing.\n\nA `<script type=\"module\">` arrives the same way, as **`javascript` with\n`as: \"module\"`**: JavaScript has two productions too, and a module script is one\nwherever it sits. The built-in JavaScript minimizers read it as their own\n`module` option, so the engine is never handed the word itself; a minify\nfunction of your own claiming `javascript` is handed it and decides. Ignore it\nat your peril: a module script read as a classic one is a syntax error the\nmoment it holds a top-level `await`.\n\nAn event handler attribute — `onclick=\"\"` — arrives as **`javascript` with\n`as: \"event-handler\"`**: its value is a function body, the production the\n`return` cancelling an event is written in. No JavaScript engine here parses one\non its own, so each built-in minimizer minifies the function that body belongs\nto and answers with the body back out of it. A minify function of your own is\nhanded the body as written and reads it however its engine can.\n\nThe nested case needs a minifier that can hand its nested bodies out, which it\nalso states for itself — webpack's `cssMinify` and `htmlMinify` do:\n\n```js\n// The languages this minifier can offer, given the options it will run with.\nmyHtmlMinifier.getEmbeddedTypes = (minimizerOptions) => [\"css\", \"javascript\"];\n```\n\nThe option is passed only when **the two declarations meet**: if nothing\nconfigured claims a language this minifier could offer, it is never handed one,\nand minification is exactly what it always was. When it is, the nested bodies\nare reached **in the same parse that prints** — the minifier leaves a marker\nwhere each one goes and the answers are put in their place, so nothing is parsed\ntwice.\n\n> **Note**\n>\n> Source a module embeds in JavaScript is minified during code generation,\n> before the worker pool is up, so [`parallel`](#parallel) does not apply to it.\n> What an asset nests inside itself is minified in the pool with the asset.\n\n## Examples\n\n### Preserve Comments\n\nExtract all legal comments (i.e. `/^\\**!|@preserve|@license|@cc_on/i`) and preserve `/@license/i` comments.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: MinimizerPlugin.terserMinify,\n          options: { format: { comments: /@license/i } },\n        },\n        extractComments: true,\n      }),\n    ],\n  },\n};\n```\n\n### Remove Comments\n\nIf you want to build without comments, use this config:\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: MinimizerPlugin.terserMinify,\n          options: { format: { comments: false } },\n        },\n        extractComments: false,\n      }),\n    ],\n  },\n};\n```\n\n### [`uglify-js`](https://github.com/mishoo/UglifyJS)\n\n[`UglifyJS`](https://github.com/mishoo/UglifyJS) is a JavaScript parser, minifier, compressor and beautifier toolkit.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: MinimizerPlugin.uglifyJsMinify,\n          // `options` will be passed to `uglify-js`\n          // Link to options - https://github.com/mishoo/UglifyJS#minify-options\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n### [`swc`](https://github.com/swc-project/swc)\n\n[`swc`](https://github.com/swc-project/swc) is a super-fast compiler written in `Rust`, producing widely supported JavaScript from modern standards and TypeScript.\n\n> **Warning**\n>\n> `extractComments` is supported with `@swc/core >= 1.15.30`.\n> Only serializable extract conditions are supported: booleans, `\"some\"`, `\"all\"`, string patterns, `RegExp` values without flags, or object conditions that resolve to those forms.\n> Function conditions and flagged regular expressions are not supported.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: MinimizerPlugin.swcMinify,\n          // `options` will be passed to `swc` (`@swc/core`)\n          // Link to options - https://swc.rs/docs/config-js-minify\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n### [`esbuild`](https://github.com/evanw/esbuild)\n\n[`esbuild`](https://github.com/evanw/esbuild) is an extremely fast JavaScript bundler and minifier.\n\n> **Warning**\n>\n> The `extractComments` option is not supported, and all legal comments (i.e. copyright, licenses and etc) will be preserved.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      new MinimizerPlugin({\n        minify: {\n          implementation: MinimizerPlugin.esbuildMinify,\n          // `options` will be passed to `esbuild`\n          // Link to options - https://esbuild.github.io/api/#minify\n          // Note: the `minify` options is true by default (and override other `minify*` options), so if you want to disable the `minifyIdentifiers` option (or other `minify*` options) please use:\n          // options: {\n          //   minify: false,\n          //   minifyWhitespace: true,\n          //   minifyIdentifiers: false,\n          //   minifySyntax: true,\n          // },\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n### JSON\n\nUses `JSON.stringify()` to minify your JSON files during the build process.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      // Keeps original terser plugin to minify JS files\n      \"...\",\n      // Will minify JSON files (they can come from copy-webpack-plugin or when you are using asset modules)\n      new MinimizerPlugin({\n        test: /\\.json$/,\n        minify: {\n          implementation: MinimizerPlugin.jsonMinify,\n          // We are supporting `space` and `replacer` options, you can set them below\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n### HTML\n\nThe plugin can minify HTML assets too. Pick one of the bundled HTML\nminimizers and set `test` to match your HTML files.\n\nAvailable HTML minimizers:\n\n- `webpack.html.syntax.htmlMinify` — webpack's own, shipped with webpack itself, so it needs no extra dependency. The one that can minify what a document nests — an inline `<style>`, a `<script>`, an `<svg>`. See [webpack's own minimizers](#webpacks-own-minimizers).\n- `MinimizerPlugin.htmlMinifierTerser` — uses [`html-minifier-terser`](https://github.com/terser/html-minifier-terser).\n- `MinimizerPlugin.swcMinifyHtml` — uses [`@swc/html`](https://github.com/swc-project/swc) for full HTML documents (with doctype and `<html>`/`<head>`/`<body>` tags).\n- `MinimizerPlugin.swcMinifyHtmlFragment` — uses [`@swc/html`](https://github.com/swc-project/swc) for HTML fragments (e.g. content inside `<template></template>` or partial HTML strings).\n- `MinimizerPlugin.minifyHtmlNode` — uses [`@minify-html/node`](https://github.com/wilsonzlin/minify-html).\n\nThe HTML minimizers are optional peer dependencies — install only the one\nyou actually use:\n\n```console\nnpm install --save-dev html-minifier-terser\n# or\nnpm install --save-dev @swc/html\n# or\nnpm install --save-dev @minify-html/node\n```\n\n> **Note**\n>\n> HTML assets typically come from plugins like\n> [`copy-webpack-plugin`](https://github.com/webpack-contrib/copy-webpack-plugin),\n> [`html-webpack-plugin`](https://github.com/jantimon/html-webpack-plugin),\n> or webpack's [asset modules](https://webpack.js.org/guides/asset-modules/).\n\n> **Note**\n>\n> Whitespace handling differs between tools (defaults):\n>\n> - `@swc/html` — removes/collapses whitespace only in safe places (around `html`/`body`, inside `<head>`, between `<meta>`/`<script>`/`<link>` etc.).\n> - `html-minifier-terser` — always collapses multiple whitespaces to a single space (never removes entirely); configurable via [its options](https://github.com/terser/html-minifier-terser#options-quick-reference).\n> - `@minify-html/node` — see [its whitespace docs](https://github.com/wilsonzlin/minify-html#whitespace).\n\n#### `html-minifier-terser`\n\n[`html-minifier-terser`](https://github.com/terser/html-minifier-terser) is a JavaScript-based HTML minifier with no native dependency.\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      // Keeps the default Terser plugin for JS files\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.html(\\?.*)?$/i,\n        minify: {\n          implementation: MinimizerPlugin.htmlMinifierTerser,\n          // Options - https://github.com/terser/html-minifier-terser#options-quick-reference\n          options: {\n            collapseWhitespace: true,\n            removeComments: true,\n          },\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `@swc/html` — HTML documents\n\nUse `swcMinifyHtml` for complete HTML documents (i.e. with a doctype and `<html>`/`<head>`/`<body>` tags).\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.html(\\?.*)?$/i,\n        minify: {\n          implementation: MinimizerPlugin.swcMinifyHtml,\n          // Options - https://github.com/swc-project/bindings/blob/main/packages/html/index.ts\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `@swc/html` — HTML fragments\n\nUse `swcMinifyHtmlFragment` for partial HTML — for example, content of `<template></template>` tags or HTML strings that get injected into another document.\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.template\\.html$/i,\n        minify: {\n          implementation: MinimizerPlugin.swcMinifyHtmlFragment,\n          // Options - https://github.com/swc-project/bindings/blob/main/packages/html/index.ts\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n> **Note**\n>\n> The difference between `swcMinifyHtml` and `swcMinifyHtmlFragment` is the\n> error reporting — invalid or broken syntax is reported at build time.\n\n#### `@minify-html/node`\n\n[`@minify-html/node`](https://github.com/wilsonzlin/minify-html) is a Rust HTML minifier.\n\n**webpack.config.js**\n\n```js\nconst Minimizer = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      \"...\",\n      new Minimizer({\n        test: /\\.html(\\?.*)?$/i,\n        minify: {\n          implementation: Minimizer.minifyHtmlNode,\n          // Options - https://github.com/wilsonzlin/minify-html#minification\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\nYou can also stack multiple `MinimizerPlugin` instances to compress different files with different `minify` functions in the same build (e.g. JS with `terserMinify`, HTML with `htmlMinifierTerser`, JSON with `jsonMinify`).\n\n### CSS\n\nThe plugin can minify CSS assets too. Pick one of the bundled CSS\nminimizers and set `test` to match your CSS files.\n\nAvailable CSS minimizers:\n\n- `webpack.css.syntax.cssMinify` — webpack's own, shipped with webpack itself, so it needs no extra dependency. The one that can minify the CSS a document nests. See [webpack's own minimizers](#webpacks-own-minimizers).\n- `MinimizerPlugin.cssnanoMinify` — uses [`cssnano`](https://cssnano.github.io/cssnano/) (via [`postcss`](https://postcss.org/)).\n- `MinimizerPlugin.cssoMinify` — uses [`csso`](https://github.com/css/csso).\n- `MinimizerPlugin.cleanCssMinify` — uses [`clean-css`](https://github.com/clean-css/clean-css).\n- `MinimizerPlugin.esbuildMinifyCss` — uses [`esbuild`](https://github.com/evanw/esbuild) with the CSS loader.\n- `MinimizerPlugin.lightningCssMinify` — uses [`lightningcss`](https://github.com/parcel-bundler/lightningcss).\n- `MinimizerPlugin.swcMinifyCss` — uses [`@swc/css`](https://github.com/swc-project/swc).\n\nThe CSS minimizers are optional peer dependencies — install only the ones\nyou actually use:\n\n```console\nnpm install --save-dev cssnano postcss\n# or\nnpm install --save-dev csso\n# or\nnpm install --save-dev clean-css\n# or\nnpm install --save-dev esbuild\n# or\nnpm install --save-dev lightningcss\n# or\nnpm install --save-dev @swc/css\n```\n\n> **Note**\n>\n> CSS assets typically come from plugins like\n> [`mini-css-extract-plugin`](https://github.com/webpack-contrib/mini-css-extract-plugin)\n> or webpack's [asset modules](https://webpack.js.org/guides/asset-modules/).\n\n#### `cssnano`\n\n[`cssnano`](https://cssnano.github.io/cssnano/) runs as a [PostCSS](https://postcss.org/) plugin.\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      // Keeps the default Terser plugin for JS files\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.css(\\?.*)?$/i,\n        minify: {\n          implementation: MinimizerPlugin.cssnanoMinify,\n          // Options - https://cssnano.github.io/cssnano/docs/config-file/\n          options: {\n            preset: \"default\",\n          },\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `csso`\n\n[`csso`](https://github.com/css/csso) is a CSS minifier with structural optimisations.\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.css(\\?.*)?$/i,\n        minify: {\n          implementation: MinimizerPlugin.cssoMinify,\n          // Options - https://github.com/css/csso#minifysource-options\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `clean-css`\n\n[`clean-css`](https://github.com/clean-css/clean-css) is a widely-used CSS optimiser.\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.css(\\?.*)?$/i,\n        minify: {\n          implementation: MinimizerPlugin.cleanCssMinify,\n          // Options - https://github.com/clean-css/clean-css#constructor-options\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `esbuild`\n\n[`esbuild`](https://github.com/evanw/esbuild) ships with a fast CSS minifier (used via its CSS loader).\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.css(\\?.*)?$/i,\n        minify: {\n          implementation: MinimizerPlugin.esbuildMinifyCss,\n          // Options - https://esbuild.github.io/api/#transform-api\n          options: {},\n        },\n      }),\n    ],\n  },\n};\n```\n\n#### `lightningcss`\n\n[`lightningcss`](https://github.com/parcel-bundler/lightningcss) is a Rust-based CSS parser, transformer, and minifier.\n\n**webpack.config.js**\n\n```js\nconst MinimizerPlugin = require(\"minimizer-webpack-plugin\");\n\nmodule.exports = {\n  optimization: {\n    minimize: true,\n    minimizer: [\n      \"...\",\n      new MinimizerPlugin({\n        test: /\\.css(\\?.*)?$/i,\n        mini","readmeFilename":"README.md"}