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

Function addToHTMLProxyCache

packages/vite/src/node/plugins/html.ts:139–152  ·  view source on GitHub ↗
(
  config: ResolvedConfig,
  filePath: string,
  index: number,
  result: { code: string; map?: SourceMapInput },
)

Source from the content-addressed store, hash-verified

137}
138
139export function addToHTMLProxyCache(
140 config: ResolvedConfig,
141 filePath: string,
142 index: number,
143 result: { code: string; map?: SourceMapInput },
144): void {
145 if (!htmlProxyMap.get(config)) {
146 htmlProxyMap.set(config, new Map())
147 }
148 if (!htmlProxyMap.get(config)!.get(filePath)) {
149 htmlProxyMap.get(config)!.set(filePath, [])
150 }
151 htmlProxyMap.get(config)!.get(filePath)![index] = result
152}
153
154export function addToHTMLProxyTransformResult(
155 hash: string,

Callers 2

addInlineModuleFunction · 0.90
handlerFunction · 0.85

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected