Skip to content

Commit

Permalink
fix: duplicate callbacks in vite-node HMR (#2792)
Browse files Browse the repository at this point in the history
* fix: duplicate listeners in vite-node hmr

* remove listeners for full reloads

* forgot a console oops
  • Loading branch information
jgoux committed Feb 3, 2023
1 parent 4fc492c commit f03337a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vite-node/src/hmr/hmr.ts
Expand Up @@ -196,6 +196,7 @@ export async function handleMessage(runner: ViteNodeRunner, emitter: HMREmitter,
break
case 'full-reload':
notifyListeners(runner, 'vite:beforeFullReload', payload)
maps.customListenersMap.delete('vite:beforeFullReload')
reload(runner, files)
break
case 'prune':
Expand Down

0 comments on commit f03337a

Please sign in to comment.