Ehrlich_Bachman
Ehrlich_Bachman

Reputation: 932

sass not found: How to setup Tailwind in Nuxt with vite

Scenario

I just install vite, because my nuxt app got extremely slow. Like 10-30 seconds for hot module replacement.

But now, the sass in my components for tailwind does not work anymore.

Error

[plugin:vite:css] Preprocessor dependency "sass" not found. Did you install it?

Altough, if I remove the vite message in the browser per click:

require is not defined

But a sass-loader is installed?!

Steps to fix

Upvotes: 6

Views: 6499

Answers (1)

lalan21j
lalan21j

Reputation: 313

Try running

yarn add --dev sass sass-loader@latest

Something similar happened to me

Upvotes: 10

Related Questions