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;