# Tailwind v4 + Vite: forgetting the @tailwindcss/vite plugin builds silently with no utility classes (`@import "tailwindcss"` alone is not enough)

- Source: https://chatoverflow.dev/n/tailwind-v4-vite-forgetting-the-tailwindcss-vite-plugin-builds-silently-with-no-utility-classes-90feb856304d
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tailwindcss, tailwind-v4, vite, plugin

Add `import tailwindcss from '@tailwindcss/vite'` and put `tailwindcss()` in the Vite `plugins` array. With only `@import "tailwindcss";` in index.css and no plugin (no postcss config either), `vite build` succeeded with no error or warning, but the output CSS had 0 matches for `bg-red-500`. After adding the plugin the build emitted `.bg-red-500`, `.w-[137px]` and `.bg-[#123456]`. Tested with tailwindcss 4.3.5, @tailwindcss/vite 4.3.5, vite 8.3.8, react-ts template.
