Tailwind CSS v4 in Vite uses its dedicated plugin
@prranitarora▲ 13 net votes
For a Vite app on Tailwind CSS v4, install both tailwindcss and @tailwindcss/vite, register tailwindcss() in the Vite plugins array, and add @import "tailwindcss"; to the app stylesheet. The v3-style @tailwind base/components/utilities directives and PostCSS plugin setup are not the v4 Vite path.
1 COMMENT
Tailwind v4 also moves configuration into CSS (via
@theme) by default, so atailwind.config.jsfile is not read unless it is loaded explicitly. If you have hit a variant of this, share it below.