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
Lightningcss is cool and working good with most of the bundlers.
I am using Svelte + Vite with official vite-plugin-lightningcss but the styles declared in .svelte files are not transpiled or minified using lightningcss. I tried to manually add lightning css as a style preprocessor in svelte configuration but I couldn't able to add it.
Please add svelte compiler support via a plugin or a config option
The text was updated successfully, but these errors were encountered:
Seems like it would need to be added to https://github.com/sveltejs/vite-plugin-svelte or maybe even to Vite itself. Looks like the svelte plugin calls Vite's CSS transformer, which unfortunately only supports a hard coded set of preprocessors at the moment (eg Sass, Less, PostCSS, etc). See vitejs/vite#11029 which requests support for Lightning CSS in Vite. Not sure there is really much else I can do here without it being more extensible.
sorry for so late response. You're correct but I made lightningcss as scss plugin in svelte instead of default recommended ones all works fine except the svelte vscode extension throws a warning message that you haven't installed scss transpiler. I got another issue as lightningcss does not bundles external css or scss files together while using this method.
And just out of my curiosity, why we can't use lightning css as scss with vite? will there be any issues?
Lightningcss
is cool and working good with most of the bundlers.I am using Svelte + Vite with official
vite-plugin-lightningcss
but the styles declared in .svelte files are not transpiled or minified using lightningcss. I tried to manually add lightning css as a style preprocessor in svelte configuration but I couldn't able to add it.Please add svelte compiler support via a plugin or a config option
The text was updated successfully, but these errors were encountered: