On this page

Parser options for css/global modules.

Type:boolean

Enable/disable renaming of @keyframes.

Type:"stylesheet" | "block-contents"

Configure how the CSS source is parsed: as a full stylesheet (default) or as a block's contents (e.g. the content of an HTML style attribute).

Type:boolean

Enable/disable renaming of @container names.

Type:boolean

Enable/disable renaming of custom identifiers.

Type:boolean

Enable/disable resolution of @custom-media at-rules (file-local build-time substitution).

Type:boolean

Enable/disable resolution of @custom-selector at-rules (file-local build-time expansion to :is(...)).

Type:boolean

Enable/disable renaming of dashed identifiers, e. g. custom properties.

Type:"link" | "text" | "css-style-sheet" | "style"

Configure how CSS content is exported as default.

Type:boolean

Auto-emit <link rel="preload" as="font"> for the primary src URL of each @font-face reachable from an HTML entry's initial CSS. Only the first URL per @font-face is preloaded (preloading every format would double-download). Off by default; parser.css.urlHints rules and per-URL magic comments still override the seeded defaults. Set output.crossOriginLoading so the preload matches the font's CORS fetch.

Type:boolean

Enable/disable renaming of @function names.

Type:boolean

Enable/disable renaming of grid identifiers.

Type:boolean

Enable/disable @import at-rules handling.

Type:boolean

Use ES modules named export for css exports.

Type:boolean

Enable/disable url()/image-set()/src()/image() functions handling.

URL-referenced-asset default hint rules for this parser (JavaScript new URL(...), CSS url(...), HTML <img src> / <link href> / <script src>).