Append to list of HMR modules, don't override (#2532)
* Append to list of HMR modules, don't override * Changeset
This commit is contained in:
parent
ef1d81effd
commit
b210fd008b
2 changed files with 6 additions and 1 deletions
5
.changeset/four-mirrors-wonder.md
Normal file
5
.changeset/four-mirrors-wonder.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes HMR of .astro modules in astro@next
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue