You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.
Not sure if it's a postcss or rollup config issue, but it seems that enabling modules for postcss makes our bundle export all css.
Consider this in my index.js
I believe this is due to the way postcss modules extracts all of the styles to be inserted into the head once instead of trying to do this once per css file which is what would need to be done to tree-shake css (and would be really inefficient).
Practically speaking, this shouldn't be much of an issue as CSS is relatively small compared to JS & image assets for most apps. However, if this is an issue for you, I'd recommend using a css-in-js approach which will work around this. You can also try bringing this issue up in the rollup-plugin-postcss repo.
Not sure if it's a postcss or rollup config issue, but it seems that enabling modules for postcss makes our bundle export all css.
Consider this in my index.js
In the example, if I do this:
All css from Text and Badge are imported, if though only Text is being used:
The JS tree shakes ok, this is happening only to css.
The text was updated successfully, but these errors were encountered: