Interface: CssOptions
Defined in: src/features/css/index.ts:3
Properties
fileName?
optional fileName: string;Defined in: src/features/css/index.ts:16
Specify the name of the CSS file.
Default
'style.css'lightningcss?
optional lightningcss: LightningCSSOptions;Defined in: src/features/css/index.ts:53
Lightning CSS options for CSS syntax lowering and transformations.
Requires @tsdown/css to be installed.
minify?
optional minify: boolean;Defined in: src/features/css/index.ts:46
Enable/disable CSS minification.
Requires @tsdown/css to be installed.
Default
falsepostcss?
optional postcss: PostCSSOptions;Defined in: src/features/css/index.ts:67
PostCSS configuration.
string: Path to the directory to search for PostCSS config files.object: Inline PostCSS options with optionalpluginsarray.- Omitted: Auto-detect PostCSS config from the project root.
Only used when transformer is 'postcss'. Requires postcss and @tsdown/css to be installed.
See
https://github.com/postcss/postcss
preprocessorOptions?
optional preprocessorOptions: PreprocessorOptions;Defined in: src/features/css/index.ts:37
Options for CSS preprocessors (Sass/Less/Stylus).
In addition to options specific to each processor, additionalData option can be used to inject extra code for each style content.
Requires @tsdown/css to be installed.
splitting?
optional splitting: boolean;Defined in: src/features/css/index.ts:10
Enable/disable CSS code splitting. When set to false, all CSS in the entire project will be extracted into a single CSS file. When set to true, CSS imported in async JS chunks will be preserved as chunks.
Default
falsetarget?
optional target: string | false | string[];Defined in: src/features/css/index.ts:27
Set the target environment for CSS syntax lowering. Accepts esbuild-style target strings (e.g., 'chrome99', 'safari16.2'). Defaults to the top-level target option.
Requires @tsdown/css to be installed.
See
https://vite.dev/config/build-options#build-csstarget
transformer?
optional transformer: "postcss" | "lightningcss";Defined in: src/features/css/index.ts:83
CSS transformer to use. Controls how CSS is processed:
'lightningcss'(default):@importhandled by Lightning CSSbundleAsync(), PostCSS is not used at all.'postcss':@importhandled bypostcss-import, PostCSS plugins applied, Lightning CSS used only for final targets/minify transform.
Requires @tsdown/css to be installed.
Default
'lightningcss'