Skip to content
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

fix(Suspence): handle Suspense + KeepAlive HMR updating edge case #13076

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yangxiuxiu1115
Copy link
Contributor

fix #13075

Copy link

github-actions bot commented Mar 20, 2025

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB 38.1 kB (-3 B) 34.4 kB (+25 B)
vue.global.prod.js 158 kB 58 kB (-3 B) 51.6 kB (+75 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.5 kB 18.2 kB 16.7 kB
createApp 54.5 kB 21.3 kB 19.5 kB
createSSRApp 58.7 kB 23 kB 21 kB
defineCustomElement 59.4 kB 22.9 kB 20.8 kB
overall 68.6 kB 26.4 kB (-3 B) 24.1 kB (+58 B)

Copy link

pkg-pr-new bot commented Mar 20, 2025

Open in Stackblitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@13076

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@13076

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@13076

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@13076

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@13076

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@13076

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@13076

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@13076

@vue/shared

npm i https://pkg.pr.new/@vue/shared@13076

vue

npm i https://pkg.pr.new/vue@13076

@vue/compat

npm i https://pkg.pr.new/@vue/compat@13076

commit: 4e5e0b4

@yangxiuxiu1115
Copy link
Contributor Author

https://github.com/vuejs/core/blob/main/packages/runtime-core/src/vnode.ts#L391-L401
Perhaps there are other uses with the same problem

@edison1105
Copy link
Member

image
Only these four places are incorrect. n1 should be the old one and the n2 should be the new one.

@edison1105 edison1105 added need test The PR has missing test cases. scope: suspense 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Mar 20, 2025
@edison1105 edison1105 changed the title fix(suspence): fix newBranch shapeFlag not reset under hmr fix(Suspence): handle Suspense + KeepAlive HMR updating edge case Mar 21, 2025
@edison1105 edison1105 added ready to merge The PR is ready to be merged. and removed need test The PR has missing test cases. labels Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. ready to merge The PR is ready to be merged. scope: suspense
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR fails when using keep-alive and Suspense.
2 participants