OptionalfileOptionalinjectWhen enabled, JS output preserves import statements pointing to emitted CSS files. Consumers of the library will automatically import the CSS alongside the JS.
OptionallightningcssLightning CSS options for CSS syntax lowering and transformations.
OptionalminifyEnable/disable CSS minification.
OptionalmodulesCSS modules configuration.
When not false, .module.css files (and preprocessor variants) are
treated as CSS modules with scoped class names.
OptionalpostcssPostCSS configuration.
string: Path to the directory to search for PostCSS config files.object: Inline PostCSS options with optional plugins array.Only used when transformer is 'postcss'.
Requires postcss to be installed.
OptionalpreprocessorOptions 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.
OptionalsplittingEnable/disable CSS code splitting.
When set to false, all CSS in the entire project will be extracted into
a single CSS file named by fileName.
When set to true, CSS imported in async JS chunks will be preserved as chunks.
Defaults to false, but if unbundle is true, it defaults to true to preserve chunk splitting.
OptionaltargetSet the target environment for CSS syntax lowering.
Accepts esbuild-style target strings (e.g., 'chrome99', 'safari16.2').
Defaults to the top-level target option.
OptionaltransformerCSS transformer to use. Controls how CSS is processed:
'lightningcss' (default): @import handled by Lightning CSS
bundleAsync(), PostCSS is not used at all.'postcss': @import handled by postcss-import,
PostCSS plugins applied, Lightning CSS used only for final
targets/minify transform.
Specify the name of the CSS file generated when
splittingisfalse.