Skip to content

Interface: CssOptions

Defined in: src/features/css/index.ts:3

Properties

fileName?

ts
optional fileName: string;

Defined in: src/features/css/index.ts:16

Specify the name of the CSS file.

Default

ts
'style.css'

lightningcss?

ts
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?

ts
optional minify: boolean;

Defined in: src/features/css/index.ts:46

Enable/disable CSS minification.

Requires @tsdown/css to be installed.

Default

ts
false

preprocessorOptions?

ts
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?

ts
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

ts
false

target?

ts
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

Released under the MIT License.