From 75e729a8a56cc71b857d1f175d2dc50992e73c9c Mon Sep 17 00:00:00 2001 From: Scott Phillips Date: Fri, 7 Jul 2017 17:53:19 -0500 Subject: [PATCH] fix(@ngtools/webpack): Race condition between invalidate & populateWebpackResolver --- packages/@ngtools/webpack/src/compiler_host.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@ngtools/webpack/src/compiler_host.ts b/packages/@ngtools/webpack/src/compiler_host.ts index 7c56c50fcfe4..e0b4fc05ce7f 100644 --- a/packages/@ngtools/webpack/src/compiler_host.ts +++ b/packages/@ngtools/webpack/src/compiler_host.ts @@ -188,7 +188,8 @@ export class WebpackCompilerHost implements ts.CompilerHost { invalidate(fileName: string): void { fileName = this._resolve(fileName); - if (fileName in this._files) { + const result = this.readFile(fileName); + if (!result) { this._files[fileName] = null; this._changedFiles[fileName] = true; }