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

Method get

packages/vite/src/node/build.ts:1250–1258  ·  packages/vite/src/node/build.ts::ChunkMetadataMap.get
(
    chunk: RenderedChunk | OutputChunk | OutputAsset,
  )

Source from the content-addressed store, hash-verified

1248 }
1249
1250 get(
1251 chunk: RenderedChunk | OutputChunk | OutputAsset,
1252 ): ChunkMetadata | AssetMetadata {
1253 const key = this._getKey(chunk)
1254 if (!this._inner.has(key)) {
1255 this._inner.set(key, this._getDefaultValue(chunk))
1256 }
1257 return this._inner.get(key)!
1258 }
1259
1260 class="cm">// reset chunk metadata on the first RenderChunk call for watch mode
1261 reset(chunk: RenderedChunk | OutputChunk | OutputAsset): void {

Callers 15

generateBundleFunction · 0.45
renderChunkFunction · 0.45
transformIndexHtmlFunction · 0.45
postFunction · 0.45
createErrorOverlayFunction · 0.45
updateStyleFunction · 0.45
removeStyleFunction · 0.45
overlay.tsFile · 0.45
getModuleByIdMethod · 0.45
getModulesByFileMethod · 0.45
getModuleByUrlMethod · 0.45
ensureModuleMethod · 0.45

Calls 4

_getKeyMethod · 0.95
_getDefaultValueMethod · 0.95
hasMethod · 0.80
setMethod · 0.45

Tested by 1

getDepJsFunction · 0.36