Skip to content

Commit

Permalink
fix: ignore hot.invalidate call if hmr timestamp is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson authored and IanVS committed Sep 25, 2022
1 parent 002bd60 commit 6c71e79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ export async function createServer(

ws.on('vite:invalidate', async (url: string) => {
const mod = moduleGraph.urlToModuleMap.get(url)
if (mod && mod.isSelfAccepting) {
if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0) {
const importers = new Set<ModuleNode>()
for (const importer of mod.importers) {
importers.add(importer)
Expand Down

0 comments on commit 6c71e79

Please sign in to comment.