MCPcopy Index your code
hub / github.com/rollup/rollup / resetCacheToEncoded

Function resetCacheToEncoded

src/utils/decodedSourcemap.ts:30–35  ·  view source on GitHub ↗

* This clears the decoded array and falls back to the encoded string form. * Sourcemap mappings arrays can be very large and holding on to them for longer * than is necessary leads to poor heap utilization.

(cache: CachedSourcemapData)

Source from the content-addressed store, hash-verified

28 * than is necessary leads to poor heap utilization.
29 */
30function resetCacheToEncoded(cache: CachedSourcemapData) {
31 if (cache.encodedMappings === undefined && cache.decodedMappings) {
32 cache.encodedMappings = encode(cache.decodedMappings);
33 }
34 cache.decodedMappings = undefined;
35}
36
37export function resetSourcemapCache(
38 map: ExistingDecodedSourceMap | null,

Callers 1

resetSourcemapCacheFunction · 0.85

Calls 1

encodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…