diff --git a/OPTIONS.md b/OPTIONS.md index 34dfa73e833..4eda8669d03 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -1113,7 +1113,7 @@ Options --no-optimization-mangle-wasm-imports Negative 'optimization-mangle-wasm-imports' option. --optimization-merge-duplicate-chunks Merge chunks which contain the same modules. --no-optimization-merge-duplicate-chunks Negative 'optimization-merge-duplicate-chunks' option. - --optimization-minimize Enable minimizing the output. Uses optimization.minimizer. An object enables it and configures the built-in minimizer per asset type. + --optimization-minimize Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions. --no-optimization-minimize Negative 'optimization-minimize' option. --no-optimization-minimize-css Negative 'optimization-minimize-css' option. --optimization-minimize-css-comments [value] 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. @@ -1184,6 +1184,75 @@ Options --optimization-minimize-html-sort-token-lists Print every space-separated token list the DOM reads as a set — `class`, `rel`, `part`, `sandbox`, `blocking`, `itemprop` / `itemref` / `itemtype`, `` and `` — in token order. Nothing matching those reads order, so this only makes the same markup compress better across pages. Off by default: a script reading `className` or `rel` back sees the new order. The lists the DOM does not read as a set are left alone whatever this says — `ping` is the order its requests go out in and `accesskey` the order its keys are tried. --no-optimization-minimize-html-sort-token-lists Negative 'optimization-minimize-html-sort-token-lists' option. --no-optimization-minimize-javascript Negative 'optimization-minimize-javascript' option. + --no-optimization-minimize-options-css Negative 'optimization-minimize-options-css' option. + --optimization-minimize-options-css-comments [value] 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. + --no-optimization-minimize-options-css-comments Negative 'optimization-minimize-options-css-comments' option. + --optimization-minimize-options-css-convert-length-units Rewrite a length into a shorter unit it is exactly equal in (`16px` -> `1pc`). Off by default: the authored unit is lost, and once the asset is compressed the rewrite rarely earns anything. + --no-optimization-minimize-options-css-convert-length-units Negative 'optimization-minimize-options-css-convert-length-units' option. + --optimization-minimize-options-css-merge-longhands Write a family of longhands as the one shorthand that sets them — four sides or corners, the two a pair shorthand sets, or the slots of an order-free one — even where unrelated declarations stand between them. On by default. + --no-optimization-minimize-options-css-merge-longhands Negative 'optimization-minimize-options-css-merge-longhands' option. + --optimization-minimize-options-css-merge-rules Join rules nothing stands between: adjacent rules that print the same block become one selector list, at-rules that share a prelude become one rule, and a named `@layer` block a later sibling opens again is folded into the first. On by default. + --no-optimization-minimize-options-css-merge-rules Negative 'optimization-minimize-options-css-merge-rules' option. + --optimization-minimize-options-css-normalize-quotes Normalize quoting: a string takes whichever quote needs fewer escapes, a `url()` and an attribute selector's value drop theirs where the content is still one token, and a font family whose name is a run of identifiers is written unquoted. On by default. + --no-optimization-minimize-options-css-normalize-quotes Negative 'optimization-minimize-options-css-normalize-quotes' option. + --optimization-minimize-options-css-reduce-functions Compute a call into the shorter call naming the same value: `calc()` and every math function over constants, a transform naming one axis or an identity, a gradient's default direction and its implied stops, an easing function that has a keyword, and a filter function given the amount an omitted argument already means. On by default. + --no-optimization-minimize-options-css-reduce-functions Negative 'optimization-minimize-options-css-reduce-functions' option. + --optimization-minimize-options-css-remove-dead-rules Drop a rule or declaration nothing can read: a rule whose block ends up empty, a declaration an identical later one in the same block makes dead, and a rule an identical later sibling makes dead. On by default. Joining rules that are not dead is `mergeRules`. + --no-optimization-minimize-options-css-remove-dead-rules Negative 'optimization-minimize-options-css-remove-dead-rules' option. + --optimization-minimize-options-css-rewrite-custom-properties Shorten the values of custom properties (`--x: #ffffff` -> `#fff`, `--y: 0.5rem` -> `.5rem`), which are otherwise written back exactly as authored. Off by default: `getComputedStyle().getPropertyValue()` hands this text back, so a rewritten value is a different CSSOM — the one place a declaration's authored text survives. What it may rewrite is exactly what any other value's tokens may be, a color in a substitution's fallback included — that fallback being the property's value rather than the function's own argument. + --no-optimization-minimize-options-css-rewrite-custom-properties Negative 'optimization-minimize-options-css-rewrite-custom-properties' option. + --optimization-minimize-options-css-shorten-colors Write each color in the shortest spelling of the same value: `#ffffff` -> `#fff`, `rgb(1 2 3)` -> `#010203`, a named color where the property takes no identifier of the author's own, and every polar and Lab function the target agrees with hex on. On by default. + --no-optimization-minimize-options-css-shorten-colors Negative 'optimization-minimize-options-css-shorten-colors' option. + --optimization-minimize-options-css-shorten-media-queries Write a media feature in its range spelling where the target reads one (`(min-width:100px)` -> `(width>=100px)`), and collapse an `and` of two one-sided ranges into the interval it describes. On by default. + --no-optimization-minimize-options-css-shorten-media-queries Negative 'optimization-minimize-options-css-shorten-media-queries' option. + --optimization-minimize-options-css-shorten-numbers Write each number in its shortest equal spelling — dropping a leading zero, a trailing fraction and a `+`, rounding to the six significant digits a stylesheet can observe, dropping the unit a zero does not need, and writing an alpha and a ratio the one way its grammar spells them. On by default. + --no-optimization-minimize-options-css-shorten-numbers Negative 'optimization-minimize-options-css-shorten-numbers' option. + --optimization-minimize-options-css-shorten-selectors Rewrite a selector into an equal one: a selector list deduplicated and ordered, a CSS2 pseudo-element's second colon dropped, the universal a compound already implies dropped, an `An+B` written the shortest way its microsyntax allows, and a `from` / `100%` keyframe selector written as the shorter of the pair. On by default. + --no-optimization-minimize-options-css-shorten-selectors Negative 'optimization-minimize-options-css-shorten-selectors' option. + --optimization-minimize-options-css-shorten-values Write a value the shortest way its property's own grammar allows: a `{1,4}` box or corner notation collapsed, a slot holding its own initial dropped, and `flex` / `font-weight` / `display` / `transition` / `` / `` written the short way. On by default. Merging separate longhand declarations is `mergeLonghands`. + --no-optimization-minimize-options-css-shorten-values Negative 'optimization-minimize-options-css-shorten-values' option. + --optimization-minimize-options-css-vendor-prefixes Maintain vendor prefixes for the `browserslist` target: add the `-webkit-` / `-moz-` / `-ms-` spelling of a property, at-rule or pseudo-selector that a selected browser still needs, and drop one none of them does. On by default, and only in effect for a `browserslist` target — any other target names no browsers to prefix for. A browserslist name no compat dataset covers (`op_mini`, `and_uc`, `and_qq`, `baidu`, `kaios`, `bb`) is skipped, and a selection of nothing but those prefixes for no one. + --no-optimization-minimize-options-css-vendor-prefixes Negative 'optimization-minimize-options-css-vendor-prefixes' option. + --no-optimization-minimize-options-html Negative 'optimization-minimize-options-html' option. + --optimization-minimize-options-html-collapse-boolean-attributes Write a boolean attribute spelled with its own name (`disabled="disabled"`) as the bare name the spec canonicalizes it to. On by default. + --no-optimization-minimize-options-html-collapse-boolean-attributes Negative 'optimization-minimize-options-html-collapse-boolean-attributes' option. + --optimization-minimize-options-html-collapse-whitespace [value] Collapse each run of whitespace in text to a single space. Left alone inside `pre`, `textarea` and `listing`, where whitespace renders verbatim. `true` (or `"conservative"`) never removes whitespace entirely — dropping it would join two inline elements that render apart. `"smart"` also drops the whitespace that sits against a block element's edge, where no line box reaches it. `"all"` drops the whitespace at every text node's edges, which does change how adjacent inline elements render. + --no-optimization-minimize-options-html-collapse-whitespace Negative 'optimization-minimize-options-html-collapse-whitespace' option. + --optimization-minimize-options-html-comments [value] Which comments survive. `"some"`, the default, keeps nothing: every comment an HTML parser reads is inert; `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 downlevel conditional comment, a server-side include and a `` template directive are code rather than comments and stay whatever this says. A predicate is handed to the minimizer's worker pool as source, so it must not close over anything. + --no-optimization-minimize-options-html-comments Negative 'optimization-minimize-options-html-comments' option. + --optimization-minimize-options-html-merge-styles Print a run of adjacent `