Optional
aliasAliases for URL and import paths
{"foo":"bar"}
Optional
autoAutomatically 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
Optional
configEnable/disable or pass options for PostCSS config loader
Optional
dtsGenerate TypeScript declarations files for input style files
Optional
excludeFiles to exclude from processing
Optional
extensionsPostCSS will process files ending with these extensions
Optional
importEnable/disable or pass options for CSS @import
resolver
Optional
includeFiles to include for processing
Optional
lessOptions for Less loader
Optional
loadersArray of custom loaders
Optional
minimizeEnable/disable or pass options for cssnano
Optional
modeSelect 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.Optional
modulesEnable/disable or pass options for CSS Modules
Optional
namedUse named exports alongside default export. You can pass a function to control how exported name is generated.
Optional
onFunction which is invoked on CSS file extraction.
Return boolean
to control if file should be extracted or not.
Optional
onFunction which is invoked on CSS file import, before any transformations are applied
Optional
parserSet PostCSS parser, e.g. sugarss
.
Overrides the one loaded from PostCSS config file, if any.
Optional
pluginsA list of plugins for PostCSS, which are used before plugins loaded from PostCSS config file, if any
Optional
sassOptions for Sass loader
Optional
sourceEnable/disable or configure sourcemaps
Optional
stringifierSet PostCSS stringifier. Overrides the one loaded from PostCSS config file, if any.
Optional
stylusOptions for Stylus loader
Optional
syntaxSet PostCSS syntax. Overrides the one loaded from PostCSS config file, if any.
Optional
toto
option for PostCSS, required for some plugins
Optional
urlEnable/disable or pass options for CSS URL resolver
Optional
useArray 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