-
-
Notifications
You must be signed in to change notification settings - Fork 834
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
HMR weirdness with Astro + Uno #2812
Comments
It looks like |
I confirmed that it is caused by withastro/astro#7381, I am not sure if I want to fix it in |
Maybe it's related to withastro/astro#7529 ? |
Yes, but it should have been broken since 2.7.1. |
HMR is supposedly fixed (haven't tried yet) in Astro 2.7.4. The uno hash warning still comes up: |
Can confirm HMR is working in Astro 2.8.0. uno hash warning still popping up, not sure if it's important: |
I don't think this warning affects HMR, but I'll try to fix it. |
This uno hash warning still popping up. Sometimes the hmr works, and sometimes not. Still need to refresh page to check the new style. |
The issue is existing until today. "astro": "^2.10.1", "unocss": "^0.54.2" |
UnoCSS version
0.53.4
Describe the bug
There are a couple of issues I have noticed trying to use the latest versions of Astro and Uno. I'm not sure if all these problems are caused by Uno, downgrading to Astro ^2.6 (from 2.7.2) fixes it. But I'm not sure if Astro is at fault here.
Running dev mode, the first thing you see the web page is completely unstyled. Refreshing fixes it.
Uno logs "[unocss-hmr] failed to get unocss hash, hmr might not work"
Now, changing some classes, the site sometimes reverts to the unstyled version (I think this happens when a previously unused class is used). Using one that has been used before is fine.
Production build is fine.
Reproduction
https://github.com/marvin-j97/astro-uno-hmr
System Info
Ubuntu, Chrome
Validations
The text was updated successfully, but these errors were encountered: