KC's Workspace
    Preparing search index...
    interface CSSOptions {
        devSourcemap?: boolean;
        lightningcss?: LightningCSSOptions;
        modules?: false | CSSModulesOptions;
        postcss?:
            | string
            | ProcessOptions<Document_ | Root_> & { plugins?: AcceptedPlugin[] };
        preprocessorMaxWorkers?: number | true;
        preprocessorOptions?: {
            less?: LessPreprocessorOptions;
            sass?: SassPreprocessorOptions;
            scss?: SassPreprocessorOptions;
            styl?: StylusPreprocessorOptions;
            stylus?: StylusPreprocessorOptions;
        };
        transformer?: "postcss"
        | "lightningcss";
    }
    Index

    Properties

    devSourcemap?: boolean

    Enables css sourcemaps during dev

    false
    @experimental
    lightningcss?: LightningCSSOptions
    modules?: false | CSSModulesOptions
    postcss?:
        | string
        | ProcessOptions<Document_ | Root_> & { plugins?: AcceptedPlugin[] }
    preprocessorMaxWorkers?: number | true

    If this option is set, preprocessors will run in workers when possible. true means the number of CPUs minus 1.

    true
    
    preprocessorOptions?: {
        less?: LessPreprocessorOptions;
        sass?: SassPreprocessorOptions;
        scss?: SassPreprocessorOptions;
        styl?: StylusPreprocessorOptions;
        stylus?: StylusPreprocessorOptions;
    }

    Options for preprocessors.

    In addition to options specific to each processors, Vite supports additionalData option. The additionalData option can be used to inject extra code for each style content.

    transformer?: "postcss" | "lightningcss"

    Using lightningcss is an experimental option to handle CSS modules, assets and imports via Lightning CSS. It requires to install it as a peer dependency.

    'postcss'
    @experimental