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(); + const filtered = new Set(ctx.modules); const files = new Set(); for (const mod of ctx.modules) { if (mod.file && isCached(config, mod.file)) {