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 0a413e7
Browse filesBrowse the repository at this point in the historyBrowse files
The section named `environment` and then waved at "the rest". Tabulate
what each minifier actually accepts, read off the two functions rather
than their JSDoc: the top-level options with types and defaults, and the
per-transform switches, which sit beside the rest rather than nested
because `pickTransforms` is handed the whole options object.
State what `css` takes on `htmlMinify`, since it is a subset plus the CSS
switches, and `environment` is deliberately not in it.
|`environment`|`{ browsers?: string[], vendorPrefixes?: boolean }`| — | What the target can read. `browsers` is a browserslist selection; `vendorPrefixes: false` leaves prefixes alone. |
1465
+
|`as`|`"stylesheet" \| "block-contents"`|`"stylesheet"`| Which production to read the source as. The plugin sets it — a `style=""` arrives as `"block-contents"`. |
1466
+
|`convertLengthUnits`|`boolean`|`false`| Rewrite a length into a shorter unit it is exactly equal in (`16px` → `1pc`). Off because it earns nothing once compressed. |
1467
+
|`rewriteCustomProperties`|`boolean`|`false`| Shorten a custom property's value like any other (`--x:#ffffff` → `--x:#fff`). Off because `getPropertyValue()` hands that text back. |
1468
+
|`unusedSymbols`|`string[]`| — | Names a whole-project analysis found unused; a bare name is a class, id or `@keyframes`, a `--`-prefixed one a custom property. |
1469
+
|`pseudoClasses`|`{ [name: string]: string }`| — | Write a pseudo-class as a class instead, so a script can apply it where the engine does not. |
1470
+
|`renderEmbeddedSource`| function | — |**Owned by the plugin** — do not pass it. |
1471
+
1472
+
Per-transform switches, each on unless set to `false`:
|`environment`| same as `cssMinify`| — | CSS's, not HTML's: handed to the CSS minifier this runs over inline CSS. |
1499
+
|`css`| object |`{}`| The CSS minifier's options for that inline CSS — see below. |
1500
+
|`collapseWhitespace`|`boolean \| "conservative" \| "smart" \| "all"`|`false`| Collapses each run of whitespace in text, except where an ancestor renders it verbatim; `"smart"` also drops what sits against a block edge, `"all"` every edge. |
1501
+
|`removeEmptyAttributes`|`boolean`|`false`| Drops an attribute whose empty value leaves it in the state its absence gives. |
1502
+
|`removeEmptyElements`|`boolean`|`false`| Drops an element with no children and no attributes, unless its bare form is meaningful. |
1503
+
|`mergeStyles`|`boolean`|`false`| Prints a run of adjacent `<style>` elements as one sheet. |
1504
+
|`sortAttributes`|`boolean`|`false`| Prints attributes commonest name first, ties by name — nothing in HTML reads the order. |
1505
+
|`sortTokenLists`|`boolean`|`false`| Prints every token list the DOM reads as a set (`class`, `rel`, `part`, …) in token order. |
1506
+
|`removeRedundantAttributes`|`boolean \| "smart" \| "all"`|`false`| Drops an attribute whose value is the element's own default; `"all"` also drops spec defaults a selector can match. |
1507
+
|`removeImpliedTags`|`boolean \| "smart" \| "all"`|`"smart"`| How much of the `<html>` / `<head>` / `<body>` shell may be left out: `"smart"` only the `<html>` start tag, `true` / `"all"` all six. |
1508
+
|`minifyConditionalComments`|`boolean`|`false`| Minifies the markup inside a conditional comment's body. |
1509
+
|`renderEmbeddedSource`| function | — |**Owned by the plugin** — do not pass it. |
1510
+
1511
+
Per-transform switches, each on unless set to `false`:
0 commit comments