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

Function getRunnerSourceMap

packages/vite/src/module-runner/sourcemap/interceptor.ts:104–116  ·  view source on GitHub ↗
(position: OriginalMapping)

Source from the content-addressed store, hash-verified

102}
103
104function getRunnerSourceMap(position: OriginalMapping): CachedMapEntry | null {
105 for (const moduleGraph of evaluatedModulesCache) {
106 const sourceMap = moduleGraph.getModuleSourceMapById(position.source!)
107 if (sourceMap) {
108 return {
109 url: position.source,
110 map: sourceMap,
111 vite: true,
112 }
113 }
114 }
115 return null
116}
117
118function retrieveFile(path: string): string | null | undefined | false {
119 if (path in fileContentsCache) return fileContentsCache[path]

Callers 1

mapSourcePositionFunction · 0.85

Calls 1

Tested by

no test coverage detected