Optional
analyzeOptional
cssWhether to compile this file as a CSS module.
Optional
customDefines how to parse custom CSS at-rules. Each at-rule can have a prelude, defined using a CSS syntax string, and a block body. The body can be a declaration list, rule list, or style block as defined in the css spec.
Optional
draftsWhether to enable parsing various draft syntax.
Optional
errorWhether to ignore invalid rules and declarations rather than erroring. When enabled, warnings are returned, and the invalid rule or declaration is omitted from the output code.
Optional
excludeFeatures that should never be compiled, even when unsupported by targets.
Optional
includeFeatures that should always be compiled, even when supported by targets.
Optional
inputAn input source map to extend.
Optional
minifyWhether to enable minification
Optional
nonWhether to enable various non-standard syntax.
Optional
projectAn optional project root path, used as the source root in the output source map. Also used to generate relative paths for sources used in CSS module hashes.
Optional
pseudoReplaces user action pseudo classes with class names that can be applied from JavaScript. This is useful for polyfills, for example.
Optional
sourceWhether to output a source map.
Optional
targetsThe browser targets for the generated code.
Optional
unusedWhether to remove unused selectors or keywords.
Optional
visitorAn AST visitor object. This allows custom transforms or analysis to be implemented in JavaScript.
Multiple visitors can be composed into one using the composeVisitors
function.
For optimal performance, visitors should be as specific as possible about what types of values
they care about so that JavaScript has to be called as little as possible.
Whether to analyze dependencies (e.g.
@import
andurl()
). When enabled,@import
rules are removed, andurl()
dependencies are replaced with hashed placeholders that can be replaced with the final urls later (after bundling). Dependencies are returned as part of the result.