Skip to content

Commit

Permalink
Update packages/vite/src/node/server/index.ts
Browse files Browse the repository at this point in the history
Co-authored-by: 翠 / green <green@sapphi.red>
  • Loading branch information
aleclarson and sapphi-red committed Sep 26, 2022
1 parent 970aa77 commit 93608ea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/vite/src/node/server/index.ts
Expand Up @@ -498,12 +498,8 @@ export async function createServer(
ws.on('vite:invalidate', async (url: string) => {
const mod = moduleGraph.urlToModuleMap.get(url)
if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0) {
const importers = new Set<ModuleNode>()
for (const importer of mod.importers) {
importers.add(importer)
}
const file = getShortName(mod.file!, config.root)
updateModules(file, Array.from(importers), mod.lastHMRTimestamp, server)
updateModules(file, [...mod.importers], mod.lastHMRTimestamp, server)
}
})

Expand Down

0 comments on commit 93608ea

Please sign in to comment.