Design system performance tuning #156
-
Hi all, We're having a discussion internally on how to handle splitting our themes to produce smaller css files. Presently with the default usage of One option we're looking at is using Has anyone looked in to doing this sort of performance tuning on their design system? I know I read somewhere that the authors had thought about trying to attempt tree shaking the generated vars and/or classes with the Webpack plugin but it was very far in the too hard basket for now. Cheers, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hey @loliver 👋 Not sure where you heard about tree shaking not working. That issue was specific to treat rather than vanilla-extract. You should be able to tree shake your themes as long as you're using the createThemeContract API. If you've done that, make sure each theme lives in its own file. Then normal CSS splitting techniques should apply. |
Beta Was this translation helpful? Give feedback.
Hey @loliver 👋
Not sure where you heard about tree shaking not working. That issue was specific to treat rather than vanilla-extract. You should be able to tree shake your themes as long as you're using the createThemeContract API. If you've done that, make sure each theme lives in its own file. Then normal CSS splitting techniques should apply.