Use Your Favorite PostCSS-Plugins With Svelte
Svelte plugin for using PostCSS plugins in svelte components
Install
npm install --save-dev svelte-postcss
or
npm i -D headmad/svelte-postcss
Usage
// rollup.config.js ;;... ... plugins:
In exemple, all PostCSS plugins will be applied to each svelte-file separately.
If you whant appli PostCSS to all styles of project, you mast add next code
// rollup.config.js ;;... ... plugins:
In exemple used plugins postcss-svelte-global-styles and css-mqpacker
Also
You can use other gonfig sources. Like exemple - section postcss
in package.json
{
...
"postcss": {
"map": false,
"plugins": {
"postcss-svelte-global-styles": {},
...
}
}
}
Or postcss.config.js
file
moduleexports = map: false plugins: 'postcss-svelte-global-styles': {} }
License
MIT