fix(compiler): properly work on windows

Verified manually on a windows surface tablet.

Fixes #19492
This commit is contained in:
Tobias Bosch
2017-10-03 13:47:39 -07:00
committed by Alex Rickabaugh
parent 0833b59aab
commit 696af79dc7
2 changed files with 14 additions and 2 deletions

View File

@ -108,7 +108,8 @@ export class TsCompilerAotCompilerTypeCheckHostAdapter extends
private resolveModuleName(moduleName: string, containingFile: string): ts.ResolvedModule
|undefined {
const rm = ts.resolveModuleName(
moduleName, containingFile, this.options, this, this.moduleResolutionCache)
moduleName, containingFile.replace(/\\/g, '/'), this.options, this,
this.moduleResolutionCache)
.resolvedModule;
if (rm && this.isSourceFile(rm.resolvedFileName)) {
// Case: generateCodeForLibraries = true and moduleName is