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

Function genSourceMapUrl

packages/vite/src/node/server/sourcemap.ts:136–141  ·  view source on GitHub ↗
(map: SourceMap | string)

Source from the content-addressed store, hash-verified

134}
135
136export function genSourceMapUrl(map: SourceMap | string): string {
137 if (typeof map !== 'string') {
138 map = JSON.stringify(map)
139 }
140 return `data:application/json;base64,${Buffer.from(map).toString('base64')}`
141}
142
143export function getCodeWithSourcemap(
144 type: 'js' | 'css',

Callers 3

inlineSourceMapFunction · 0.90
generateBundleFunction · 0.90
getCodeWithSourcemapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected