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

Function getSourcemapModules

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

Source from the content-addressed store, hash-verified

80};
81
82export const getSourcemapModules = (
83 id: string,
84 outputChunk: BundlerOutputChunk,
85 dir: string,
86): Promise<Record<string, SourceMapModuleRenderInfo>> => {
87 if (outputChunk.map == null) {
88 return Promise.resolve({});
89 }
90 return SourceMapConsumer.with(outputChunk.map as RawSourceMap, null, (map) => {
91 return getBytesPerFileUsingSourceMap(id, outputChunk.code, map, dir);
92 });
93};

Callers 2

generateBundleFunction · 0.85
sourcemap.test.tsFile · 0.85

Calls 1

Tested by

no test coverage detected