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 Vue HMR for script tags #8860

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Fix Vue HMR for script tags #8860

merged 1 commit into from
Oct 18, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 18, 2023

Changes

Fix #8071

When the Component is HMR-ed, Component has new values within itself. So when we render the Vue island, we should access Component dynamically so it doesn't render old values and caused hydration errors.

Testing

Added new e2e hmr test

Docs

n/a

@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2023

🦋 Changeset detected

Latest commit: aab8b9d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: vue Related to Vue (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Oct 18, 2023
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smart approach

@bluwy bluwy merged commit 65c7bd1 into main Oct 18, 2023
13 checks passed
@bluwy bluwy deleted the vue-hmr-script branch October 18, 2023 13:23
@astrobot-houston astrobot-houston mentioned this pull request Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR doesn't work on Vue components
2 participants