You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
I encountered some hot update issues in my project. The variables in the file seem to disappear after the hot update. It may be okay before the version around beta.36, and the specific version is not very certain. But it appeared after a certain upgrade
I tried to restore it in the smallest example, I think this should be a bug rather than a writing problem
The scenario here is to dynamically add routing, because my project really has dynamically added routing that will disappear after the hot update (I only restore this situation, I think other situations should be similar to this one). I set a timer in router/index.ts, which is convenient for observing the value of router.getRoutes() after hot update
Click the to page a link to jump to the PageA page
Open /src/views/PageA.vue and modify the value of Page A to trigger hot update
You can see as shown in the figure below. Because the timer is used here, it will print two consecutively, the length of 3 should be the timer before the hot update is triggered, and the length of 1 is the data after the hot update. The route added dynamically after the hot update here has been lost
This is just a minimal recurring example.
This problem has bothered me for a long time and has not been resolved.
If the above example does not explain well, you can try to pull this complicated example and reproduce it
Describe the bug
I encountered some hot update issues in my project. The variables in the file seem to disappear after the hot update. It may be okay before the version around beta.36, and the specific version is not very certain. But it appeared after a certain upgrade
I tried to restore it in the smallest example, I think this should be a bug rather than a writing problem
Reproduction
router.getRoutes()
after hot updateThis is just a minimal recurring example.
This problem has bothered me for a long time and has not been resolved.
If the above example does not explain well, you can try to pull this complicated example and reproduce it
System Info
vite
version:2.0.4Logs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.The text was updated successfully, but these errors were encountered: