Open cagline opened 3 years ago
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) src/main.css (1:0)
Error has been resolved after adding ./main.css
as an external
{
input: 'src/main.js',
external: ['./main.css'],
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' }
]
}
Expected Behavior
Actual Behavior
I'm writing JS library using rollup-starter-lib as base of my JS library
Before update rollup version, I feel like it's .css file not creating due to tree shaking because of css not used in this JS library itself.
Then, I update rollup version to
2.26.3
from1.29.0
now it's generate only following two files along with below error. It's seams there is an issue with rollup or postCss plugin.rollup.config.js
main.js
Basically there is not usage of
main.css
within JS library it self. but it's necessary when integrate this library.