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
500
Semicolon or block is expected
4: <style>
5: h1 {
6: @apply dark:text-red-500;
^
7: }
8:
ParseError: Semicolon or block is expected
at error (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/svelte/compiler.mjs:17698:19)
at Parser$1.error (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/svelte/compiler.mjs:17774:9)
at Object.read_style [as read] (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/svelte/compiler.mjs:14106:20)
at tag (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/svelte/compiler.mjs:16857:33)
at new Parser$1 (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/svelte/compiler.mjs:17733:21)
at parse$3 (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/svelte/compiler.mjs:17865:20)
at compile (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/svelte/compiler.mjs:31310:17)
at compileSvelte (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:318:20)
at async TransformContext.transform (file:///Users/amadeus/Code/sveltekit-tailwind/node_modules/@sveltejs/vite-plugin-svelte/dist/index.js:1374:27)
at async Object.transform (/Users/amadeus/Code/sveltekit-tailwind/node_modules/vite/dist/node/chunks/dep-36bf480c.js:50373:30)
You should run SvelteKit with a preprocessor to convert PostCSS to CSS so that Svelte knows how to handle it. This error is coming from Svelte itself, which probably means there's some error in the preprocessor converting it to valid CSS. I know lots of people are using Tailwind without issue, so my first guess would be that something is set something up wrong. Try setting up your project with https://github.com/svelte-add/tailwindcss, which is pretty popular and works well
I'm going to close this since it's not a bug in SvelteKit itself. It would most likely be in the preprocessor if there were a bug instead of a usage issue
Describe the bug
I'm using SvelteKit with TailwindCSS. The following code produces an error:
However, the same block of css code inside of a
.css
file works as expected.Reproduction
https://github.com/drthoben/sveltekit-tailwind
Logs
System Info
Severity
annoyance
Additional Information
Thank you a million times for this framework. Just started using it and I already love it.
The text was updated successfully, but these errors were encountered: