[v4] Correct parsing of style tags and tailwind css values in .svelte files #15510
Unanswered
hugentobler
asked this question in
Help
Replies: 2 comments
-
By parser errors, do you mean
|
Beta Was this translation helpful? Give feedback.
0 replies
-
You're correct that Vite v4 integrates Tailwind CSS, but you still need to specify lang="postcss" "Skydiving in Dhanaulti, Uttarakhand" within your Svelte components. This tells Svelte to use PostCSS for style parsing, enabling the use of Tailwind CSS directives like @apply. |
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
-
I followed the "Installing with Vite" instructions from v4 documentation, where:
My understanding here is that v4 is packaged with postcss so I don't have to additionally specify postcss config anymore.
However, if I try to use @apply in my .svelte file styles block, I get parser errors unless I specify
<style lang="postcss">
. I expected v4 to handle this natively, or did I misunderstand the docs and it is in fact expected behaviour to still have to specify postcss.For example:
Beta Was this translation helpful? Give feedback.
All reactions