You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a65a583
Browse filesBrowse the repository at this point in the historyBrowse files
fix(css,html): keep a name folded only where the engine reads it back
The case fold reached two places it must not. A value the engine keeps as
the tokens it was written as until a substitution resolves now prints its
function, url and unit spellings as written, and an
`@font-feature-values` sub-rule's declaration names stay case-sensitive:
they are `<custom-ident>` feature values, so folding made two distinct
entries collide.
Also from review: `optimization.minimize.css: false` now reaches the CSS
inside a document, `reduceFunctions` and `mergeLonghands` govern the last
rewrite each was missing, a comment selector decides the source-map pragma
like any other comment, and a parser-inserted table group prints its start
tag whenever its end tag prints.
Copy file name to clipboardExpand all lines: .changeset/078-css-html-minify-options.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"webpack": minor
3
3
---
4
4
5
-
Print every CSS name that matches ASCII case-insensitively in one case — a property, at-rule, function, `url()`, pseudo, media feature, media type, unit, and a keyword value on a property whose grammar takes no name of the author's — keeping the canonical spelling of the eleven transform functions and three units the spec capitalizes; and name each of the CSS and HTML minimizers' rewrites on `optimization.minimize.css` / `.html` (`comments`, `mergeLonghands`, `mergeRules`, `normalizeQuotes`, `reduceFunctions`, `removeDeadRules`, `shortenColors`, `shortenMediaQueries`, `shortenNumbers`, `shortenSelectors`, `shortenValues`; `collapseBooleanAttributes`, `comments`, `minifyJson`, `minifyStyles`, `normalizeAttributeQuotes`, `normalizeEnumeratedAttributes`, `normalizeListAttributes`, `normalizeNumericAttributes`, `removeOptionalTags`), so one a document trips over can be turned off while the rest still apply — `comments` taking the six forms terser's `format.comments` does. The tables both minimizers read are smaller by 116 KiB of retained heap.
5
+
Print CSS names in one case, and name each CSS/HTML minifier rewrite an option.
* Which comments survive. `"some"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `"all"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `"some"` would have kept. A `/*#` source-map pragma is a link rather than a commentand stays whatever this says. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.
2413
+
* Which comments survive. `"some"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `"all"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `"some"` would have kept. A `/*#` source-map pragma is a link rather than a comment, so `"some"` and `"all"` keep it; `false`, a pattern or a predicate decides it like any other. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.
Copy file name to clipboardExpand all lines: schemas/WebpackOptions.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3724,7 +3724,7 @@
3724
3724
"additionalProperties": false,
3725
3725
"properties": {
3726
3726
"comments": {
3727
-
"description": "Which comments survive. `\"some\"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `\"all\"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `\"some\"` would have kept. A `/*#` source-map pragma is a link rather than a commentand stays whatever this says. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.",
3727
+
"description": "Which comments survive. `\"some\"`, the default, keeps a `/*!` banner and a comment annotated `@license` or `@preserve`; `true` (or `\"all\"`) keeps every comment and `false` keeps none; a string is read as a regular expression source, and it, a `RegExp` or a `(comment) => boolean` predicate is asked about each comment's own text and keeps the ones it accepts — standing in for the default rule rather than beside it, as terser's `format.comments` does, so a pattern that names nothing else drops the ones `\"some\"` would have kept. A `/*#` source-map pragma is a link rather than a comment, so `\"some\"` and `\"all\"` keep it; `false`, a pattern or a predicate decides it like any other. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything.",
0 commit comments