New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live reload doesn't work with Tailwind #7870
Comments
I try to test this in my PR. It can run by expected. Would you had a time to test it again? |
It works with 2.9.1 and not with 2.9.2. @poyoho I tested your PR but it is not working. I changed |
you should add below code in css file instead of html. because css in html don't support need compile css syntax. @tailwind base;
@tailwind components;
@tailwind utilities; |
I'll remove the fix mark first, then I'll test it, and then provide a test environment in playground. I still think #7869· can fix it 🙈 |
The root cause was that index.html has |
Note that reverting #7561 will break vite-plugin-ssr. I'm having a look at how to solve this. |
AFAICT the solution here is to set |
Yep, that fixes it. Let me PR. |
Done #7895. |
I was very close to submitting another issue related to #6695, begging for the option to allow disabling forced reloads without disabling HMR altogether, since the Tailwind config was causing those in my "legacy PHP application". The workaround in that thread doesn't work anymore, and the thread where discussion was supposed to continue is dead. Luckily for me, It doesn't do that anymore after updating to 2.9.6! Was running 2.9.0 previously. Posting this comment in case anyone else is having the same issue and thinks they need the option, that you maintainers been opposed about adding since it would have a chance of being a footgun. That thread comes up on Google while troubleshooting, so I think it's beneficial that it contains a link to this thread. After all, finding this issue made me realise updating might fix my issue. I probably wouldn't have updated Vite otherwise, due to the traumas Webpack upgrades gave me. Thanks for the great work! |
Describe the bug
After installing Tailwind, it stopped live reloading for changes on
index.html
.It's weird because it logs this counter below and it does reload for
main.js
.I'm assuming it's still detecting changes but they are not being sent to the client.
Thanks.
Reproduction
https://stackblitz.com/edit/vitejs-vite-bbqmud?file=index.html&terminal=dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: