Skip to content

Commit 548b56a

Browse files
committed
fixup! fix(@angular/build): scope BundlerContext invalidation and cache one-shot bundle results
1 parent 8f6cec1 commit 548b56a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/angular/build/src/tools/esbuild/bundler-context.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,12 @@ export class BundlerContext {
473473
}
474474

475475
async #addLoadCacheFilesToWatch(): Promise<void> {
476-
if (this.incremental && this.#loadCache && this.#loadCacheKeys) {
477-
for (const key of this.#loadCacheKeys) {
478-
const cachedResult = await this.#loadCache.get(key);
476+
const loadCache = this.#loadCache;
477+
if (this.incremental && loadCache && this.#loadCacheKeys) {
478+
const results = await Promise.all(
479+
Array.from(this.#loadCacheKeys, (key) => loadCache.get(key)),
480+
);
481+
for (const cachedResult of results) {
479482
if (cachedResult?.watchFiles) {
480483
for (const file of cachedResult.watchFiles) {
481484
if (!isInternalAngularFile(file)) {

0 commit comments

Comments
 (0)