DEV Community

Discussion on: Sveltekit Vite with Tailwind 2

Collapse
esgabo profile image
Gabriel Espinel

Hi, Dan. This is very helpful.

Have you experienced an issued with the "hover:underline" in the index.svelte file?. I'm getting an error

Build Error: @snowpack/plugin-svelte
Semicolon or block is expected (31:32)
29: }
30: a {
31: @apply text-indigo-600 hover:underline;
^
32: }

It seems it's not able to process the CSS correctly. Once I remove that, it works.

Collapse
dansvel profile image
dan Author

hm,, it's hard because you don't use the code style,,

i think it would be the

a {
  @apply text-indigo-600 hover: underline; /* use space after colon will make error in preprocess */
  @apply text-indigo-600 hover:underline;
}
Enter fullscreen mode Exit fullscreen mode
div {
  @apply md: px-4; /* not works */
  @apply md:px-4; /* work fine */
}
Enter fullscreen mode Exit fullscreen mode
Collapse
esgabo profile image
Gabriel Espinel

Thanks. I'm sorry about the format. I didn't make any change to your code, I simply clone the repo and it didn´t worked for me as is. The code doesn´t have any space.

Collapse
esgabo profile image
Gabriel Espinel

I think I found the issue.
The file svelte.config does not have the ´postcss: true´ in the repo
github.com/dansvel/sveltekit-types...

However, it does instruct that property in this current page. Once I applied that config, it worked fine. Thanks.

You may want to apply that fix in the repo as well.

Thread Thread
dansvel profile image
dan Author

aw man,, thanks,, i already update the file,,

i still in experiment to make the repo as simple as possible,,