(path: string)
| 834 | |
| 835 | const revertWindowsDriveRE = /^\/windows\/([A-Z])\// |
| 836 | function unescapeToLinuxLikePath(path: string) { |
| 837 | if (path.startsWith('/linux/')) { |
| 838 | return path.slice('/linux'.length) |
| 839 | } |
| 840 | if (path.startsWith('/windows/')) { |
| 841 | return path.replace(revertWindowsDriveRE, '$1:/') |
| 842 | } |
| 843 | return path |
| 844 | } |
| 845 | |
| 846 | // based on https://github.com/sveltejs/svelte/blob/abf11bb02b2afbd3e4cac509a0f70e318c306364/src/compiler/utils/mapped_code.ts#L221 |
| 847 | const nullSourceMap: RawSourceMap = { |