mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
use normalized path when checking for mangled new contents, (#171964)
* use normalized path when checking for mangled new contents, https://github.com/microsoft/vscode/issues/170767 * add missing js file
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -127,7 +127,9 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
|
||||
let ts2tsMangler = new Mangler(compile.projectPath, (...data) => fancyLog(ansiColors.blue('[mangler]'), ...data));
|
||||
const newContentsByFileName = ts2tsMangler.computeNewFileContents();
|
||||
mangleStream = es.through(function write(data: File & { sourceMap?: RawSourceMap }) {
|
||||
const newContents = newContentsByFileName.get(data.path);
|
||||
type TypeScriptExt = typeof ts & { normalizePath(path: string): string };
|
||||
const tsNormalPath = (<TypeScriptExt>ts).normalizePath(data.path);
|
||||
const newContents = newContentsByFileName.get(tsNormalPath);
|
||||
if (newContents !== undefined) {
|
||||
data.contents = Buffer.from(newContents.out);
|
||||
data.sourceMap = newContents.sourceMap && JSON.parse(newContents.sourceMap);
|
||||
|
||||
Reference in New Issue
Block a user