summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/four-mirrors-wonder.md5
-rw-r--r--packages/astro/src/vite-plugin-astro/hmr.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/four-mirrors-wonder.md b/.changeset/four-mirrors-wonder.md
new file mode 100644
index 000000000..901fbf523
--- /dev/null
+++ b/.changeset/four-mirrors-wonder.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixes HMR of .astro modules in astro@next
diff --git a/packages/astro/src/vite-plugin-astro/hmr.ts b/packages/astro/src/vite-plugin-astro/hmr.ts
index 84f06cda5..12bf274d0 100644
--- a/packages/astro/src/vite-plugin-astro/hmr.ts
+++ b/packages/astro/src/vite-plugin-astro/hmr.ts
@@ -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)) {