tailwindlabs / tailwindcss

A utility-first CSS framework for rapid UI development.
https://tailwindcss.com/
MIT License
83.41k stars 4.22k forks source link

[v4] Tailwind CSS classes not updating in output when adding previously unused classes - requires server restart #14800

Open binajmen opened 1 month ago

binajmen commented 1 month ago

What version of Tailwind CSS are you using?

"@tailwindcss/vite": "^4.0.0-alpha.30",
"tailwindcss": "^4.0.0-alpha.30"

What build tool (or framework if it abstracts the build tool) are you using?

"@solidjs/start": "^1.0.9",
"vinxi": "^0.4.3"

What version of Node.js are you using?

"node": ">=18"

What browser are you using?

Firefox

What operating system are you using?

macOS

Reproduction URL

Since SolidStart isn't currently working on Stackblitz, please test locally:

  1. Clone the repository: git clone https://github.com/binajmen/bun-solidstart-tw4
  2. Install dependencies and start the dev server: bun install && bun dev
  3. You should see a colored background on the index page
  4. Try changing the background color class in app.tsx (e.g., to bg-blue-400) and save the file
  5. The background will turn white instead of updating to the new color
  6. Only after manually restarting bun dev will the new background color appear

Describe your issue

When adding Tailwind classes that weren't previously used anywhere in the codebase, these new classes aren't being included in the generated CSS file. The changes only take effect after manually restarting the development server.

matmkian commented 4 days ago

Same issue here on beta 1 using TanStack Start