Fixes compilation in windows

Related #170767
This commit is contained in:
Jean Pierre 2023-01-29 17:37:06 -05:00
parent 339fd630e6
commit 22cfea1eb7
2 changed files with 9 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -494,7 +494,7 @@ export class Mangler {
} else {
// source map generator
const relativeFileName = path.relative(projectDir, item.fileName);
const relativeFileName = normalize(path.relative(projectDir, item.fileName));
const mappingsByLine = new Map<number, Mapping[]>();
// apply renames
@ -569,6 +569,9 @@ function hasModifier(node: ts.Node, kind: ts.SyntaxKind) {
return Boolean(modifiers?.find(mode => mode.kind === kind));
}
function normalize(path: string): string {
return path.replace(/\\/g, '/');
}
async function _run() {