fix(compiler): make watch mode work on windows (#19953)

Fixes #19951
PR Close #19953
This commit is contained in:
Tobias Bosch 2017-10-26 15:27:21 -07:00 committed by Matias Niemelä
parent 957be960d2
commit 31797d3b50
1 changed files with 2 additions and 1 deletions

View File

@ -129,6 +129,7 @@ export function performWatchCompilation(host: PerformWatchHost):
return {close, ready: cb => readyPromise.then(cb), firstCompileResult}; return {close, ready: cb => readyPromise.then(cb), firstCompileResult};
function cacheEntry(fileName: string): CacheEntry { function cacheEntry(fileName: string): CacheEntry {
fileName = path.normalize(fileName);
let entry = fileCache.get(fileName); let entry = fileCache.get(fileName);
if (!entry) { if (!entry) {
entry = {}; entry = {};
@ -249,7 +250,7 @@ export function performWatchCompilation(host: PerformWatchHost):
if (event === FileChangeEvent.CreateDeleteDir) { if (event === FileChangeEvent.CreateDeleteDir) {
fileCache.clear(); fileCache.clear();
} else { } else {
fileCache.delete(fileName); fileCache.delete(path.normalize(fileName));
} }
if (!ingoreFilesForWatch.has(path.normalize(fileName))) { if (!ingoreFilesForWatch.has(path.normalize(fileName))) {