Skip to content

Commit

Permalink
Append to list of HMR modules, don't override (#2532)
Browse files Browse the repository at this point in the history
* Append to list of HMR modules, don't override

* Changeset
  • Loading branch information
matthewp authored Feb 3, 2022
1 parent ef1d81e commit b210fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-mirrors-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes HMR of .astro modules in astro@next
2 changes: 1 addition & 1 deletion packages/astro/src/vite-plugin-astro/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function handleHotUpdate(ctx: HmrContext, config: AstroConfig) {

// go through each of these modules importers and invalidate any .astro compilation
// that needs to be rerun.
const filtered = new Set<ModuleNode>();
const filtered = new Set<ModuleNode>(ctx.modules);
const files = new Set<string>();
for (const mod of ctx.modules) {
if (mod.file && isCached(config, mod.file)) {
Expand Down

0 comments on commit b210fd0

Please sign in to comment.