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))) {