-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 (Hot reload) not working #6390
Comments
I'm encountering a similar issue.
You can see the console recompiling, but the content stay the same. If I refresh the page, it works again. here is my envinfo if it helps:
|
After some hard debugging, I found that the new Also, your project is using |
Hi @zhangzhonghe , Yes, it's a project created with vue cli. But I've the same project with Vite and the same issue occurs(which I initially reported here: vitejs/vite-plugin-vue#3 ). What should I do? |
The minimal reproduction of your issue is here. Vue does not currently support HMR with this modification. Would you be willing to reopen an issue to help us document this if you can, thanks! |
I can, but I'm not sure to understand the benefit of creating another issue than this one? |
What @Melbourneandrew said is that it takes a long time for the page to update, which is different from what you said about not updating. And the minimal reproduction he provided does not reproduce the issue he described. @jaytonic |
Done: #7155 |
Vue version
3.2.13
Link to minimal reproduction
https://github.com/Melbourneandrew/vue-hmr-broken
Steps to reproduce
Project files:
https://github.com/Melbourneandrew/vue-hmr-broken
Vue info output:
What is expected?
When I do
npm run serve
I am expecting a dev environment where upon saving changes to the project files, the changes are promptly reflected in the localhost:8080 browser window.I am also expecting the browser console to read
[HMR] Waiting for update signal from WDS...
upon page load, and
reload
upon hot reload.
What is actually happening?
Whenever I save changes to the project files, the
npm run serve
process recompiles the code but the browser does not show areload
message and it takes 10-15s before the changes are reflected in the browser.I also note that when the page loads, the
[HMR] Waiting for update signal from WDS...
is not displayed.System Info
System: OS: macOS 12.5 CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz Memory: 10.78 GB / 32.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.3.0 - /usr/local/bin/node npm: 7.15.1 - /usr/local/bin/npm Watchman: 2021.06.07.00 - /usr/local/bin/watchman Browsers: Chrome: 103.0.5060.134 Firefox: 84.0.2 Safari: 15.6 npmPackages: vue: ^3.2.13 => 3.2.37
Any additional comments?
I have tried reinstalling @vue/cli several times and have used
vue create
to make several new projects and the issue still persists.The text was updated successfully, but these errors were encountered: