This plugin uses lightningcss to minify CSS assets. See optimization.minimizer.
boolean
false
Whether to ignore invalid rules and declarations rather than erroring.
string[]
[]
A list of known unused symbols, including CSS class names, ids, and @keyframe names. The declarations of these will be removed.
boolean
true
Whether to automatically remove the unused local idents of CSS Modules, including unused CSS class names, ids, and @keyframe names. The declarations of these will be removed.
For example, in the following CSS Modules, class names a and b are exported, but only class name a is used in the js file:
At this point, the information that class name b is unused will be obtained via Rspack's tree shaking feature and provided to lightningcss. During minimization, the declaration for class name b will be removed from the CSS output, resulting in the following final output:
string[]
["defaults"]
Browserslist targets to compile the CSS for.