(
filename: string,
map1: ExistingRawSourceMap | { mappings: '' } | undefined,
map2: ExistingRawSourceMap | { mappings: '' } | undefined,
)
| 1894 | } |
| 1895 | |
| 1896 | function combineSourcemapsIfExists( |
| 1897 | filename: string, |
| 1898 | map1: ExistingRawSourceMap | { mappings: '' } | undefined, |
| 1899 | map2: ExistingRawSourceMap | { mappings: '' } | undefined, |
| 1900 | ): ExistingRawSourceMap | { mappings: '' } | undefined { |
| 1901 | if (!map1 || !map2) { |
| 1902 | return map1 |
| 1903 | } |
| 1904 | if (map1.mappings === '' || map2.mappings === '') { |
| 1905 | return { mappings: '' } |
| 1906 | } |
| 1907 | return combineSourcemaps(filename, [ |
| 1908 | // type of version property of ExistingRawSourceMap is number |
| 1909 | // but it is always 3 |
| 1910 | map1 as RawSourceMap, |
| 1911 | map2 as RawSourceMap, |
| 1912 | ]) as ExistingRawSourceMap |
| 1913 | } |
| 1914 | |
| 1915 | const viteHashUpdateMarker = '/*$vite$:1*/' |
| 1916 | const viteHashUpdateMarkerRE = /\/\*\$vite\$:\d+\*\// |
no test coverage detected