Replies: 3 comments 1 reply
-
|
The TypeScript error happens because A cleaner approach is to spread the plugin result so it matches the expected Vite plugin structure: import tailwindcss from "@tailwindcss/vite"
export default defineNuxtConfig({
compatibilityDate: "2025-07-15",
devtools: { enabled: true },
vite: {
plugins: [
...tailwindcss(),
],
},
})For the CSS path issue in step 5, Nuxt resolves assets using the css: ['./app/assets/css/main.css']use: css: ['~/assets/css/main.css']This ensures Nuxt resolves the file correctly and avoid |
Beta Was this translation helpful? Give feedback.
-
|
Type issue seems to be a Nuxt bug that should be fixed in their next release. |
Beta Was this translation helpful? Give feedback.
-
|
This error is caused by a type mismatch between Nuxt’s Vite types and the plugin returned by
Until Nuxt updates their Vite typings, the safest workaround is to cast the plugin: import tailwindcss from "@tailwindcss/vite"
export default defineNuxtConfig({
compatibilityDate: "2025-07-15",
devtools: { enabled: true },
vite: {
plugins: [
tailwindcss() as any,
],
},
})This is only a temporary TypeScript workaround and does not affect runtime behavior. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was using the nuxt guide to install tailwind.
https://tailwindcss.com/docs/installation/framework-guides/nuxt
However, I encountered the following error in step 3:
Step 3 Configure Vite Plugin
Solution:
To fix this, just add as any after tailwindcss().
Error in step 5:
In step 5, it asks you to configure the path as follows:
However, the following error occurs:
It should be configured as follows:
Could someone update the documentation? I don't understand how to update it.
Beta Was this translation helpful? Give feedback.
All reactions