MCPcopy Create free account
hub / github.com/btd/rollup-plugin-visualizer / getSourcemapModules

Function getSourcemapModules

plugin/sourcemap.ts:47–58  ·  view source on GitHub ↗
(
  id: string,
  outputChunk: BundlerOutputChunk,
  dir: string,
)

Source from the content-addressed store, hash-verified

45};
46
47export const getSourcemapModules = (
48 id: string,
49 outputChunk: BundlerOutputChunk,
50 dir: string,
51): Promise<Record<string, SourceMapModuleRenderInfo>> => {
52 if (outputChunk.map == null) {
53 return Promise.resolve({});
54 }
55 return SourceMapConsumer.with(outputChunk.map as RawSourceMap, null, (map) => {
56 return getBytesPerFileUsingSourceMap(id, outputChunk.code, map, dir);
57 });
58};

Callers 1

generateBundleFunction · 0.85

Calls 1

Tested by

no test coverage detected