Patch css hot reload ss2#2147
Conversation
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
commit: |
|
Hey @madaxen86, thank you a lot for the fix! What are the exact reproduction steps needed, were the hot reload for css did not work? You linked an issue regarding Tailwind, does this only relate to Tailwind or can it be reproduced without it? When looking at the implementation, it seems as if this fix reloads each and every css file, not only the ones related to routes? Why is it necessary to reload all css 😅? |
|
Added the repro to the description. NOTE: PR is not ready to be merged. Just needed a pkg.pr.new to test on stackblitz. This is specifically related to tailwindcss (and probably pandacss) where there are no css files changed directly, you just apply the atomic classes in tsx/jsx files. Hot updates work with Vite v6. I am still investigating and I'll ping you when I find a solutions that's actually applicable. Reloading all css modules is overkill of course. I just don't get why even that does not work in stackblitz!? |
PR Checklist
Please check if your PR fulfills the following requirements:
What is the current behavior?
When adding classes to file routes/layouts tailwind does not hot reload the css file.
This PR invalidates css modules when a file route is changed.
REPRODUCTION
with-tailwindcsstemplatesrc/routes/index.tsxtext-sky-500totext-purple-500==> blue color is removed ✅, purple is not added ❌