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: hydration __vnode missing #9328

Merged
merged 2 commits into from
Nov 10, 2023
Merged

fix: hydration __vnode missing #9328

merged 2 commits into from
Nov 10, 2023

Conversation

antfu
Copy link
Member

@antfu antfu commented Oct 3, 2023

In the basic renderer, we inject __vnode on dev for devtools to grab it. We missing that information in SSR as we didn't do so in hydration.

if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
Object.defineProperty(el, '__vnode', {
value: vnode,
enumerable: false
})
Object.defineProperty(el, '__vueParentComponent', {
value: parentComponent,
enumerable: false
})
}

@vercel
Copy link

vercel bot commented Oct 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
sfc-playground ⬜️ Ignored (Inspect) Visit Preview Oct 3, 2023 7:04am

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 85.9 kB 32.6 kB 29.5 kB
vue.global.prod.js 132 kB 49.3 kB 44.4 kB

Usages

Name Size Gzip Brotli
createApp 47.9 kB 18.8 kB 17.2 kB
createSSRApp 50.6 kB 19.9 kB 18.2 kB
defineCustomElement 50.3 kB 19.6 kB 17.9 kB
overall 61.2 kB 23.7 kB 21.6 kB

@sxzz sxzz added the ready for review This PR requires more reviews label Oct 8, 2023
@pikax
Copy link
Member

pikax commented Oct 13, 2023

@antfu can you add a test pls

@antfu
Copy link
Member Author

antfu commented Oct 15, 2023

@antfu can you add a test pls

I'd love to, but we didn't even have any tests for devtools. It might be better to delegate that to another PR.

@pikax pikax added ready to merge The PR is ready to be merged. and removed ready for review This PR requires more reviews labels Oct 20, 2023
@yyx990803 yyx990803 merged commit 5156ac5 into main Nov 10, 2023
15 checks passed
@yyx990803 yyx990803 deleted the fix/hydration-vnode branch November 10, 2023 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

5 participants