fix(compiler-cli): use forward slashes for ts.resolveModuleName (#18784)

Windows paths have back slashes, but TypeScript expects to always have forward slashes.

In other places where this call happens (like `src/compiler_host.ts`) the same fix is present.

PR Close #18784
This commit is contained in:
Filipe Silva 2017-08-18 16:53:08 +01:00 committed by Miško Hevery
parent 7522987a51
commit e228f2caa6
1 changed files with 2 additions and 2 deletions

View File

@ -61,8 +61,8 @@ class CompilerHostMixin {
containingFile = path.join(this.basePath, 'index.ts');
}
const resolved = ts.resolveModuleName(
m, containingFile, this.options, this.moduleResolutionHost,
this.moduleResolutionCache)
m, containingFile.replace(/\\/g, '/'), this.options,
this.moduleResolutionHost, this.moduleResolutionCache)
.resolvedModule;
if (resolved) {
if (this.options.traceResolution) {