From 31797d3b5073ae686fa0fe18ecaf51ffc98c63bc Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 26 Oct 2017 15:27:21 -0700 Subject: [PATCH] fix(compiler): make watch mode work on windows (#19953) Fixes #19951 PR Close #19953 --- packages/compiler-cli/src/perform_watch.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/perform_watch.ts b/packages/compiler-cli/src/perform_watch.ts index 2943bc7f5c..d27026eed7 100644 --- a/packages/compiler-cli/src/perform_watch.ts +++ b/packages/compiler-cli/src/perform_watch.ts @@ -129,6 +129,7 @@ export function performWatchCompilation(host: PerformWatchHost): return {close, ready: cb => readyPromise.then(cb), firstCompileResult}; function cacheEntry(fileName: string): CacheEntry { + fileName = path.normalize(fileName); let entry = fileCache.get(fileName); if (!entry) { entry = {}; @@ -249,7 +250,7 @@ export function performWatchCompilation(host: PerformWatchHost): if (event === FileChangeEvent.CreateDeleteDir) { fileCache.clear(); } else { - fileCache.delete(fileName); + fileCache.delete(path.normalize(fileName)); } if (!ingoreFilesForWatch.has(path.normalize(fileName))) {