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

Enable hydration for Vue apps #129

Merged
merged 1 commit into from
Dec 26, 2021
Merged

Enable hydration for Vue apps #129

merged 1 commit into from
Dec 26, 2021

Conversation

CyberAP
Copy link
Contributor

@CyberAP CyberAP commented Dec 17, 2021

Right now Vue apps are not hydrated on a client due to a createApp used in a client bundle, instead of createSSRApp. The latter is what enables hyration on a client.

To verify this set a breakpoint in a e.isMounted else condition in a vendor chunk here: https://vercelvitessr.vercel.app/ (this site is using vite-ssr).

image

Then check how the DOM looks when it triggers.

After the change the hydration should work as expected.

Right now Vue apps are not hydrated on a client due to a `createApp` used in a client bundle, instead of `createSSRApp`. The latter is what enabled hyration on a client.
To prove this to you just set a breakpoint in a `e.isMounted` else condition in a vendor chunk here: .
@frandiox
Copy link
Owner

@CyberAP Thanks! Turns out I was using createSSRApp in entry-server and it had to be the other way around 😅

@frandiox frandiox merged commit 4de65dc into frandiox:master Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants