-
|
In the latest Nuxt version (4.3.1), attempting to use the Tailwind Vite plugin via the Does anyone else get this issue? This only happened after I tried updating from Nuxt 4.2.2. I saw a similar post here: #17541 (comment), but their solution of deleting the lockfile and reinstalling the packages doesn't seem to work. I created a repo that seems to be able to reproduce this issue here. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
this is a vite version mismatch between what's happening
type PluginOption = Thenable<Plugin | FalsyPlugin | PluginOption[]>the problem is that nuxt 4.3.x bumped its internal vite dependency to between vite versions, the the same issue has shown up in solidstart and astro for the same reason. fixoption 1: force a single vite version (cleanest) add {
"dependencies": {
"vite": "^7.3.1"
}
}then delete your lockfile + option 2: package manager override for pnpm: {
"pnpm": {
"overrides": {
"vite": "^7.3.1"
}
}
}for npm: {
"overrides": {
"vite": "^7.3.1"
}
}option 3: suppress the type error (quick workaround) export default defineNuxtConfig({
vite: {
plugins: [
// @ts-expect-error vite type mismatch between @nuxt/schema and @tailwindcss/vite
tailwindcss()
],
},
})this is safe at runtime since vite flattens nested plugin arrays regardless of the types. relevant links
|
Beta Was this translation helpful? Give feedback.
-
|
This seems to no longer be an issue with |
Beta Was this translation helpful? Give feedback.

This seems to no longer be an issue with
@tailwindcss/viteversion 4.2.2 and/or Nuxt 4.3.1.