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

Append to list of HMR modules, don't override #2532

Merged
merged 2 commits into from
Feb 3, 2022
Merged

Append to list of HMR modules, don't override #2532

merged 2 commits into from
Feb 3, 2022

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Feb 3, 2022

Changes

  • When finding modules that should be HMRed, start with the list that has already been discovered by Vite.
  • If you return from handleHotUpdate it overrides any existing modules to update. So you must append to the list, not just return new ones.
  • Closes 🐛 BUG: HMR not working in astro@next #2528

Testing

Tested via example apps.

Docs

N/A, bug fix.

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2022

🦋 Changeset detected

Latest commit: 8d7713d

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

This PR includes changesets to release 1 package
Name Type
astro Patch

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 the pkg: astro Related to the core `astro` package (scope) label Feb 3, 2022
@FredKSchott
Copy link
Member

Nice quick fix!

@netlify
Copy link

netlify bot commented Feb 3, 2022

✔️ Deploy Preview for astro-docs-2 ready!

🔨 Explore the source changes: da209e8

🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-docs-2/deploys/61fc4756c78505000807361a

😎 Browse the preview: https://deploy-preview-2532--astro-docs-2.netlify.app

@netlify
Copy link

netlify bot commented Feb 3, 2022

✔️ Deploy Preview for astro-docs-2 ready!

🔨 Explore the source changes: 8d7713d

🔍 Inspect the deploy log: https://app.netlify.com/sites/astro-docs-2/deploys/61fc47715dc1cc00077a310d

😎 Browse the preview: https://deploy-preview-2532--astro-docs-2.netlify.app

@matthewp matthewp merged commit b210fd0 into main Feb 3, 2022
@matthewp matthewp deleted the regular-hmr branch February 3, 2022 21:41
@github-actions github-actions bot mentioned this pull request Feb 3, 2022
@github-actions github-actions bot mentioned this pull request Feb 18, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* Append to list of HMR modules, don't override

* Changeset
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: HMR not working in astro@next
2 participants