From 875469fb0f10c78115e9bcf3096dfe794cde11ee Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Sun, 6 Sep 2026 11:26:29 +0000 Subject: [PATCH 1/2] docs: prefer the object form of `minify`, and list webpack's own minimizers first MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `minify` is documented as an object first — the minimizer and its own options in one place — with the array kept for several minimizers and the bare function as shorthand. `minimizerOptions` is cut to a short deprecated note pointing at it. webpack's own `cssMinify` and `htmlMinify` head the CSS and HTML lists, where they were missing or last, and the custom minify examples show the properties a minifier declares: `getTypes`, and `getEmbeddedTypes` with `renderEmbeddedSource` for one that nests other languages. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_016TQeNpahUSDUjD2Crugy5H --- README.md | 414 +++++++++++++++++++++++++++++------------------------- 1 file changed, 223 insertions(+), 191 deletions(-) diff --git a/README.md b/README.md index 82e45b2..36e800b 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,15 @@ JSON minimizer: HTML minimizers: -- [`html-minifier-terser`](https://github.com/terser/html-minifier-terser) — `MinimizerPlugin.htmlMinifierTerser`. The default HTML minimizer. JavaScript-based, no native dependency. Requires `npm install --save-dev html-minifier-terser`. +- 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 `