Skip to content

Commit

Permalink
fix(compiler-cli): use forward slashes for ts.resolveModuleName (#18784)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
filipesilva authored and mhevery committed Aug 19, 2017
1 parent 7522987 commit e228f2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/compiler-cli/src/transformers/compiler_host.ts
Expand Up @@ -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) {
Expand Down

0 comments on commit e228f2c

Please sign in to comment.