[v4] Correct parsing of style tags and tailwind css values in .svelte files #15510
-
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 For example:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
By parser errors, do you mean
|
Beta Was this translation helpful? Give feedback.
-
I tried the solution (using '"css.customData"' setting) from this other thread and it worked well to suppress warnings for Unfortunately every single recent review on the recommended PostCSS VS Code extension above (entire first page is consistent 1 star reviews) indicates it is outdated, disruptive, and causes more problems than it solves. Are there perhaps alternative solutions for now? (To be clear, Tailwind is fine and builds fine. This is about how VSCode is flagging warnings eg on |
Beta Was this translation helpful? Give feedback.
By parser errors, do you mean
semi-colon expectedcss(css-semicolonexpected)
andUnknown at rule @applycss(unknownAtRules)
? If so, these are errors from VSCode not understanding the custom Tailwind syntax, not from the project compilation system. You could try one of:css.validate
VSCode setting tofalse
.