(map: SourceMapLike, file: string)
| 56 | } |
| 57 | |
| 58 | async function computeSourceRoute(map: SourceMapLike, file: string) { |
| 59 | let sourceRoot: string | undefined |
| 60 | try { |
| 61 | class="cm">// The source root is undefined for virtual modules and permission errors. |
| 62 | sourceRoot = await fsp.realpath( |
| 63 | path.resolve(path.dirname(file), map.sourceRoot || class="st">''), |
| 64 | ) |
| 65 | } catch {} |
| 66 | return sourceRoot |
| 67 | } |
| 68 | |
| 69 | export async function injectSourcesContent( |
| 70 | map: SourceMapLike, |
no test coverage detected