Tailwind V4 not recognize in production
I'm encountering an issue with Tailwind CSS in production. Everything works perfectly in local development — my Tailwind classes are recognized and applied correctly. However, in production, the classes aren't recognized, and the app.css stylesheet can't be loaded.
I've already tried adding the source function, but that didn't resolve the issue. I'm deploying the project on Netlify, and aside from this Tailwind-related problem, everything else works fine.
Here's my project structure:
In /app/lib/styles/app.css:
In /app/routes/__root.tsx:
In production, the following CSS file fails to load: https://test.netlify.app/_build/assets/app-DWwm2m29.css
2 Replies
harsh-harlequin•6mo ago
"fails to load" as in the file is not existing?
is there another css file with a different hash?
afraid-scarletOP•6mo ago
My bad, it was actually a configuration issue on my Netlify deployment that was causing the problem