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

Function reloadModule

packages/vite/src/node/server/index.ts:701–713  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

699 .result
700 },
701 async reloadModule(module) {
702 warnFutureDeprecation(config, 'removeServerReloadModule')
703 if (serverConfig.hmr !== false && module.file) {
704 // TODO: Should we also update the node moduleGraph for backward compatibility?
705 const environmentModule = (module._clientModule ?? module._ssrModule)!
706 updateModules(
707 environments[environmentModule.environment]!,
708 module.file,
709 [environmentModule],
710 monotonicDateNow(),
711 )
712 }
713 },
714 async listen(port?: number, isRestart?: boolean) {
715 const hostname = await resolveHostname(config.server.host)
716 if (httpServer) {

Callers

nothing calls this directly

Calls 3

warnFutureDeprecationFunction · 0.90
updateModulesFunction · 0.90
monotonicDateNowFunction · 0.90

Tested by

no test coverage detected