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

🐛 BUG: HMR with vue components causes a hydration mismatch error #3559

Closed
1 task done
tony-sull opened this issue Jun 8, 2022 · 1 comment · Fixed by #3932
Closed
1 task done

🐛 BUG: HMR with vue components causes a hydration mismatch error #3559

tony-sull opened this issue Jun 8, 2022 · 1 comment · Fixed by #3932
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: hmr Related to HMR (scope)

Comments

@tony-sull
Copy link
Contributor

What version of astro are you using?

1.0.0-beta.42

Are you using an SSR adapter? If so, which one?

none

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

When editing a vue component in dev, the page flashes with the new content then reverts back after vue hits the following error

Hydration completed but contains mismatches.

It looks like vue core has a few recent changes that are related to hydration and HMR that may be related to this regression

Reproduction

To reproduce, clone the latest framework-vue starter and change any of the rendered HTML - the brower flashes with the update then reverts

According to Vue's docs, any updates to the <template> or <style> should be hot reloaded without losing the component state, any changes to the <script> should refresh the component back to it's default state in case any lifecycle hooks had side effects

Link to Minimal Reproducible Example

https://stackblitz.com/github/withastro/astro/tree/latest/examples/framework-vue?file=package.json&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.
@tony-sull tony-sull added - P4: important Violate documented behavior or significantly impacts performance (priority) s1-small labels Jun 8, 2022
@tony-sull
Copy link
Contributor Author

Tried rolling back a few versions with both Vue and Astro and the issue still reproduces, not sure how recent this regression is?

@FredKSchott FredKSchott added the feat: hmr Related to HMR (scope) label Jul 7, 2022
@natemoo-re natemoo-re linked a pull request Jul 20, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: hmr Related to HMR (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants