tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

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

Open binajmen opened this issue 3 months ago • 1 comments

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.

binajmen avatar Oct 26 '24 09:10 binajmen