fix: breakpoints in extension subdirs on windows not working (#184195)

It did not normalize to forward slashes, so the empty sourcemap was
created with a source called `foo\\bar.js`. Then the build process was
adding a new source `foo/bar.js` since it didn't see it already in the
sourcemap, but `foo\\bar.js` was later normalized. This normalized
version came first in the mapping, but didn't have any mapped locations,
so breakpoints never got set.
This commit is contained in:
Connor Peet
2023-06-02 11:15:04 -07:00
committed by GitHub
parent 9b12d4ada6
commit ccc5e48e92
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -219,7 +219,7 @@ export function loadSourcemaps(): NodeJS.ReadWriteStream {
version: '3',
names: [],
mappings: '',
sources: [f.relative],
sources: [f.relative.replace(/\\/g, '/')],
sourcesContent: [contents]
};