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

Function getSortedHotUpdatePlugins

packages/vite/src/node/server/hmr.ts:402–409  ·  view source on GitHub ↗
(environment: Environment)

Source from the content-addressed store, hash-verified

400
401const sortedHotUpdatePluginsCache = new WeakMap<Environment, Plugin[]>()
402function getSortedHotUpdatePlugins(environment: Environment): Plugin[] {
403 let sortedPlugins = sortedHotUpdatePluginsCache.get(environment)
404 if (!sortedPlugins) {
405 sortedPlugins = getSortedPluginsByHotUpdateHook(environment.plugins)
406 sortedHotUpdatePluginsCache.set(environment, sortedPlugins)
407 }
408 return sortedPlugins
409}
410
411export async function handleHMRUpdate(
412 type: 'create' | 'delete' | 'update',

Callers 1

handleHMRUpdateFunction · 0.85

Calls 3

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected