rollup can't extra css file
Describe the bug
I'm creating a ui group library using vanilla-extract、react、rollup。
how can I separate the css file and not import it in the js code?
Can all styles be packaged into one css file ?
Reproduction
https://github.com/graup/vanilla-extract-rollup-example/tree/main/packages/ui
System Info
rollup
Used Package Manager
yarn
Logs
No response
Validations
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Hi, the purpose of the rollup plugin is to specifically NOT bundle all CSS into one file to enable tree-shaking and consumers only needing to include the CSS for components they actually use. If you want all styles bundled, I recommend using a different bundler (like Vite).
However, we can discuss making this configurable in the rollup plugin.
I think it's a good idea, especially if it doesn't require a major lift or refactor. One could write a roll up or babel plugin to subsequently remove it, but it would be easier if this plugin had an option to not include it altogether.
Hi, the purpose of the rollup plugin is to specifically NOT bundle all CSS into one file to enable tree-shaking and consumers only needing to include the CSS for components they actually use. If you want all styles bundled, I recommend using a different bundler (like Vite).
However, we can discuss making this configurable in the rollup plugin.
Is there any configuration available for this? If the component library wishes to provide an umd package, it also needs to provide a bundle of all CSS @graup