mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +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:
parent
f1b09237cd
commit
3db45fbd42
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);
|
||||
|
|
Loading…
Reference in a new issue