mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
fix(hmr): don't mutate module graph when collecting modules (#16302)
This commit is contained in:
parent
1f5379601e
commit
dfffea1f43
@ -162,7 +162,7 @@ export async function handleHMRUpdate(
|
||||
return
|
||||
}
|
||||
|
||||
const mods = moduleGraph.getModulesByFile(file) || new Set()
|
||||
const mods = new Set(moduleGraph.getModulesByFile(file))
|
||||
if (type === 'create' || type === 'delete') {
|
||||
for (const mod of getAffectedGlobModules(file, server)) {
|
||||
mods.add(mod)
|
||||
|
Loading…
Reference in New Issue
Block a user