* @param {Array } mapChain * @param {string} destFile * @param {*} options * @return {object}
(mapChain, destFile, options)
| 29 | * @return {object} |
| 30 | */ |
| 31 | function massageSourcemaps(mapChain, destFile, options) { |
| 32 | const map = remapping(mapChain, () => null, !includeSourcesContent()); |
| 33 | map.file = path.basename(destFile); |
| 34 | map.sourceRoot = getSourceRoot(options); |
| 35 | map.sources = map.sources.map((s) => { |
| 36 | // By default, sources are relative to the map. But we just added an |
| 37 | // absolute sourceRoot, and we do not want the file to be relative to that |
| 38 | // root. |
| 39 | return resolveUri(s || '', destFile); |
| 40 | }); |
| 41 | |
| 42 | return map; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Computes the base url for sourcemaps. Custom sourcemap URLs have placeholder |
no test coverage detected