From da6d74a86e208cc5dc0a83718fb9122ca31addd4 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 5 Nov 2019 15:15:11 +0000 Subject: [PATCH] fix(@ngtools/webpack): fix resource dep lookup on windows Fix https://github.com/angular/angular-cli/issues/15863 --- packages/ngtools/webpack/src/angular_compiler_plugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ngtools/webpack/src/angular_compiler_plugin.ts b/packages/ngtools/webpack/src/angular_compiler_plugin.ts index 13415446ed13..6891427808e5 100644 --- a/packages/ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/ngtools/webpack/src/angular_compiler_plugin.ts @@ -1258,8 +1258,10 @@ export class AngularCompilerPlugin { if (!this._resourceLoader) { return []; } + // The source loader uses TS-style forward slash paths for all platforms. + const resolvedFileName = forwardSlashPath(fileName); - return this._resourceLoader.getResourceDependencies(fileName); + return this._resourceLoader.getResourceDependencies(resolvedFileName); } // This code mostly comes from `performCompilation` in `@angular/compiler-cli`.