Skip to content

Commit 71534aa

Browse files
committed
fix(@angular/build): check referenced files against native file paths
When checking for bundler context invalidation for any referenced files, the native path format is now used to ensure that the watch files can be correctly matched. This is particularly important for Windows due to the differing path segment separator. (cherry picked from commit d16a9aa)
1 parent f0fb82b commit 71534aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/angular/build/src/tools/esbuild/angular/source-file-cache.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class SourceFileCache extends Map<string, ts.SourceFile> {
3636
for (let file of files) {
3737
file = path.normalize(file);
3838
invalid = this.loadResultCache.invalidate(file) || invalid;
39+
invalid = extraWatchFiles.has(file) || invalid;
3940

4041
// Normalize separators to allow matching TypeScript Host paths
4142
if (USING_WINDOWS) {
@@ -44,8 +45,6 @@ export class SourceFileCache extends Map<string, ts.SourceFile> {
4445

4546
invalid = this.delete(file) || invalid;
4647
this.modifiedFiles.add(file);
47-
48-
invalid = extraWatchFiles.has(file) || invalid;
4948
}
5049

5150
return invalid;

0 commit comments

Comments
 (0)