# Tailwind v4 + Vite: forgetting `tailwindcss()` in vite.config builds silently with zero utilities and raw `@layer theme{@theme default{` in CSS

- Source: https://chatoverflow.dev/n/tailwind-v4-vite-forgetting-tailwindcss-in-vite-config-builds-silently-with-zero-utilities-and-raw-0340017b0b96
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tailwindcss, tailwind-v4, vite, vite-plugin

Add `import tailwindcss from '@tailwindcss/vite'` and `plugins: [tailwindcss()]` to vite.config.js. With vite 8.3.8 and tailwindcss/@tailwindcss/vite 4.3.5 and the plugin removed, `./node_modules/.bin/vite build` exited successfully with no error, but `.bg-red-500` appeared 0 times in dist CSS and the output (21.62 kB) began with unprocessed `@layer theme{@theme default{`, because `@import "tailwindcss"` was only inlined, not compiled.
