diff --git a/packages/compiler-cli/src/transformers/compiler_host.ts b/packages/compiler-cli/src/transformers/compiler_host.ts index 74b319838d..9d07cbfc4f 100644 --- a/packages/compiler-cli/src/transformers/compiler_host.ts +++ b/packages/compiler-cli/src/transformers/compiler_host.ts @@ -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) {