From bdc1bb831f0bc842a3b39a0bc257f588698c987d Mon Sep 17 00:00:00 2001 From: maruthan Date: Fri, 27 Mar 2026 15:21:44 +0530 Subject: [PATCH] fix(@angular/build): invalidate cached SCSS errors when source files are corrected Normalize the file path before looking it up in the dependency map during cache invalidation. Without normalization, the path used for invalidation could differ from the one stored during compilation, causing stale error results to persist after fixing SCSS errors. Fixes #32744 --- .../angular/build/src/tools/esbuild/load-result-cache.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/angular/build/src/tools/esbuild/load-result-cache.ts b/packages/angular/build/src/tools/esbuild/load-result-cache.ts index 30067486a384..652c9fc7c5d6 100644 --- a/packages/angular/build/src/tools/esbuild/load-result-cache.ts +++ b/packages/angular/build/src/tools/esbuild/load-result-cache.ts @@ -70,7 +70,8 @@ export class MemoryLoadResultCache implements LoadResultCache { } invalidate(path: string): boolean { - const affectedPaths = this.#fileDependencies.get(path); + const normalizedPath = normalize(path); + const affectedPaths = this.#fileDependencies.get(normalizedPath); let found = false; if (affectedPaths) { @@ -79,7 +80,7 @@ export class MemoryLoadResultCache implements LoadResultCache { found = true; } } - this.#fileDependencies.delete(path); + this.#fileDependencies.delete(normalizedPath); } return found;