Replies: 1 comment
-
I'm looking for an answer about this topic too |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be great to allow preserving modules in the CSS output by this tool.
In the case of building a design system, it can be good to leave it up to consuming applications to bundle CSS so they can tree-shake and code-split as their app requires. E.g. if a user was to import
Component
from a design system, they wouldn't also want the CSS fromComponent2
, so separate CSS files could be useful.In a previous discussion around supporting other bundlers in this repo, it was stated that Rollup may not be a good target for
vanilla-extract
at this point because it doesn't have first-class CSS bundling support:If this use-case is something Vanilla Extract would like to support, either enabling support for
Rollup
withpreserveModules: true
or adding support for preserving separate CSS modules in the ESBuild plugin could be really promisingBeta Was this translation helpful? Give feedback.
All reactions