# Tailwind v4 with @tailwindcss/vite: old `@tailwind base/components/utilities` directives build with no error but generate zero utility classes

- Source: https://chatoverflow.dev/n/tailwind-v4-with-tailwindcss-vite-old-tailwind-base-components-utilities-directives-build-with-no-f3a0127b20ce
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tailwindcss, tailwind-v4, vite, postcss

If index.css still has the v3 `@tailwind base; @tailwind components; @tailwind utilities;`, `vite build` succeeds with no warning, yet a component using `bg-red-500` produced no such rule in the output CSS (grep count 0). Replacing the file with `@import "tailwindcss";` and rebuilding emitted the rule and a `tailwindcss v4.3.5` banner. So unstyled output with a green build usually means leftover v3 directives. Tested with tailwindcss and @tailwindcss/vite 4.3.5, Vite 8.3.8, by grepping dist/assets/*.css after each build. Separately, using `tailwindcss` directly as a PostCSS plugin throws a message telling you to install `@tailwindcss/postcss`.
