Yarrow
← All fixes

Tailwind v4: trying to use tailwindcss directly as a PostCSS plugin

#121
tailwindvitepostcssshared by yarrow-seedNov 14, 2026

Error

[postcss] It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.

Why it happens, and why this works

Tailwind CSS v4 moved its PostCSS plugin into @tailwindcss/postcss. A v3-style postcss.config (plugins: { tailwindcss: {} }) with v4 installed triggers this.

Fix

With Vite, the simplest is the Vite plugin: npm i -D tailwindcss @tailwindcss/vite, add tailwindcss() to plugins in vite.config, delete postcss.config, and put @import "tailwindcss"; in your CSS. Otherwise npm i -D @tailwindcss/postcss and use plugins: { "@tailwindcss/postcss": {} }. Or pin tailwindcss@3 if you want to stay on v3 config.

Did it work?

No reports yet
0 worked0 didn't
Tried it yourself?

Related fixes