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
vite-plugin-svelte can use a feature in vite 6.2 to scope the css module containing styles to the js module of the component, which helps to treeshake unused css from components that are referenced in barrel files but never used in an app.
This can not be done in a non-breaking way if a style block contains unscoped global styles, so vite-plugin-svelte needs this information and currently has to add zimmerframe and walk the css ast itself to determine if there is a selector that starts with :global.
Describe the proposed solution
when svelte compile creates the css output, it can determine this and add it to a new meta prop on Code, making it available to other tools as well and avoid the extra dependency/code/perf hit in vite-plugin-svelte.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered:
Describe the problem
vite-plugin-svelte can use a feature in vite 6.2 to scope the css module containing styles to the js module of the component, which helps to treeshake unused css from components that are referenced in barrel files but never used in an app.
see sveltejs/vite-plugin-svelte#1092
This can not be done in a non-breaking way if a style block contains unscoped global styles, so vite-plugin-svelte needs this information and currently has to add zimmerframe and walk the css ast itself to determine if there is a selector that starts with
:global
.Describe the proposed solution
when svelte compile creates the css output, it can determine this and add it to a new
meta
prop onCode
, making it available to other tools as well and avoid the extra dependency/code/perf hit in vite-plugin-svelte.Importance
would make my life easier
The text was updated successfully, but these errors were encountered: