I have the same problem as described in the issue #160. So i implemented the folllowing solution to generate the separated CSS :
//rollup.config.js
const glob = require('glob')
const path = require('path')
const postcss = require('rollup-plugin-postcss')
const bundleCss = () => {
var config = []
var files = glob.sync(path.resolve(__dirname, '**/*.css'))
files.forEach(file => {
var filename = file.substr(file.lastIndexOf('/') + 1, file.length).toLowerCase()
config.push(
postcss({
include: file,
extract: path.resolve(`dist/${filename}`),
minimize: true
})
)
})
return config
}
modules.exports = {
plugins: [
...bundleCss()
]
}
It worked well, but i'm worried about the use of the option include
. I didn't find information about this option in the docs, then i have some questions:
include
option will be supported in the future?Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too