OptionalaliasAliases for URL and import paths
{"foo":"bar"}OptionalautoAutomatically enable
CSS Modules
for files named [name].module.[ext]
(e.g. foo.module.css, bar.module.stylus),
or pass your own function or regular expression
OptionalconfigEnable/disable or pass options for PostCSS config loader
OptionaldtsGenerate TypeScript declarations files for input style files
OptionalexcludeFiles to exclude from processing
OptionalextensionsPostCSS will process files ending with these extensions
OptionalimportEnable/disable or pass options for CSS @import resolver
OptionalincludeFiles to include for processing
OptionallessOptions for Less loader
OptionalloadersArray of custom loaders
OptionalminimizeEnable/disable or pass options for cssnano
OptionalmodeSelect mode for this plugin:
"inject" (default) - Embeds CSS inside JS and injects it into <head> at runtime.
You can also pass options for CSS injection.
Alternatively, you can pass your own CSS injector."extract" - Extract CSS to the same location where JS file is generated but with .css extension.
You can also set extraction path manually,
relative to output dir/output file's basedir,
but not outside of it."emit" - Emit pure processed CSS and pass it along the build pipeline.
Useful if you want to preprocess CSS before using it with CSS consuming plugins.OptionalmodulesEnable/disable or pass options for CSS Modules
OptionalnamedUse named exports alongside default export. You can pass a function to control how exported name is generated.
OptionalonFunction which is invoked on CSS file extraction.
Return boolean to control if file should be extracted or not.
OptionalonFunction which is invoked on CSS file import, before any transformations are applied
OptionalparserSet PostCSS parser, e.g. sugarss.
Overrides the one loaded from PostCSS config file, if any.
OptionalpluginsA list of plugins for PostCSS, which are used before plugins loaded from PostCSS config file, if any
OptionalsassOptions for Sass loader
OptionalsourceEnable/disable or configure sourcemaps
OptionalstringifierSet PostCSS stringifier. Overrides the one loaded from PostCSS config file, if any.
OptionalstylusOptions for Stylus loader
OptionalsyntaxSet PostCSS syntax. Overrides the one loaded from PostCSS config file, if any.
Optionaltoto option for PostCSS, required for some plugins
OptionalurlEnable/disable or pass options for CSS URL resolver
OptionaluseArray of loaders to use, executed from right to left. Currently built-in loaders are:
sass (Supports .scss and .sass files)less (Supports .less files)stylus (Supports .styl and .stylus files)
rollup-plugin-styles's full option list