(hmr/keep-alive): After hmr, the page cannot be switched normally
Vue version
3.2.45
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-knceak?file=src%2FDemoA.vue,src%2FApp.vue&terminal=dev
Steps to reproduce
When I do not modify any code, the operation is very normal, and the DemoA page and DemoB page can be switched normally. However, if DemoA.vue or DemoB.vue is modified, the page switching will be invalid and there will be no error message. I have tried many versions. All versions have this problem. After deleting keep-alive, it will be normal
What is expected?
DemoA and DemoB can be opened normally after hmr
What is actually happening?
After hmr, the page cannot be switched normally, just like this page does not exist
System Info
No response
Any additional comments?
No response
Are you sure this is reproducible with the latest version of Vue? The reproduction is working fine for me.
Are you sure this is reproducible with the latest version of Vue? The reproduction is working fine for me.
Is there a problem with my node version?
Are you sure this is reproducible with the latest version of Vue? The reproduction is working fine for me.
I can reproduce it. It must be to change DemoA with DemoA displayed, then wait for hmr to finish before switching to DemoB.
Are you sure this is reproducible with the latest version of Vue? The reproduction is working fine for me.
I can reproduce it. It must be to change DemoA with DemoA displayed, then wait for hmr to finish before switching to DemoB.
I can reproduce it too. and transition mode must be out-in
It seems to be caused by here: https://github.com/vuejs/core/blob/64e6d9221d353598b5f61c158c978d80e3b4628c/packages/runtime-core/src/components/BaseTransition.ts#L207
When hmr is done, the oldInnerChild here is expired.