fix(compiler): make watch mode work on windows (#19953)
Fixes #19951 PR Close #19953
This commit is contained in:
parent
957be960d2
commit
31797d3b50
|
@ -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))) {
|
||||||
|
|
Loading…
Reference in New Issue