Skip to content

Commit 507b42f

Browse files
committed
fixup! fix(@angular/build): scope BundlerContext invalidation and cache one-shot bundle results
1 parent 7f7bb99 commit 507b42f

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
context,
1818
} from 'esbuild';
1919
import assert from 'node:assert';
20-
import { basename, dirname, extname, isAbsolute, join, normalize, relative } from 'node:path';
20+
import { basename, extname, isAbsolute, join, normalize, relative } from 'node:path';
2121
import { SERVER_GENERATED_EXTERNALS } from '../../utils/server-rendering/manifest';
2222
import {
2323
type BuildOutputFile,
@@ -461,12 +461,7 @@ export class BundlerContext {
461461
for (const error of result.errors) {
462462
let file = error.location?.file;
463463
if (file && !isInternalAngularFile(file)) {
464-
const errorFile = isAbsolute(file) ? normalize(file) : join(this.workspaceRoot, file);
465-
this.watchFiles.add(errorFile);
466-
const match = /^Could not resolve "(\.\.?\/[^"]+)"/.exec(error.text);
467-
if (match) {
468-
this.watchFiles.add(join(dirname(errorFile), match[1]));
469-
}
464+
this.watchFiles.add(isAbsolute(file) ? normalize(file) : join(this.workspaceRoot, file));
470465
}
471466
for (const note of error.notes ?? []) {
472467
file = note.location?.file;

0 commit comments

Comments
 (0)