MCPcopy
hub / github.com/vitejs/vite / onHMRUpdate

Function onHMRUpdate

packages/vite/src/node/server/index.ts:850–857  ·  view source on GitHub ↗
(
    type: 'create' | 'delete' | 'update',
    file: string,
  )

Source from the content-addressed store, hash-verified

848 }
849
850 const onHMRUpdate = async (
851 type: 'create' | 'delete' | 'update',
852 file: string,
853 ) => {
854 if (serverConfig.hmr !== false) {
855 await handleHMRUpdate(type, file, server)
856 }
857 }
858
859 const onFileAddUnlink = async (file: string, isUnlink: boolean) => {
860 file = normalizePath(file)

Callers 2

onFileAddUnlinkFunction · 0.85
onFileChangeFunction · 0.85

Calls 1

handleHMRUpdateFunction · 0.90

Tested by

no test coverage detected