Seamless integration between Rollup and PostCSS, witch process the styles and bundle them into 1 external css file;
npm install rollup-plugin-postcss-export
Use rollup import system to import styles that will be later processed by rollup and exported to a file
config
import { rollup } from 'rollup';
import postcss from 'rollup-plugin-postcss-export';
rollup({
entry: 'main.js',
plugins: [
postcss({
extensions: ['.css', '.sss'] // default value
plugins: [
// cssnext(),
// yourPostcssPlugin()
],
output: './style.css',
parse: true // default value, when set to false the imported style files are ignored in the rollup flow
})
]
}).then(...)
entry
import '/path/to/some_random_file.css'
MIT © lmihaidaniel