Skip to content

Commit 28d9ab8

Browse files
committed
perf(@angular-devkit/build-angular): only rebundle server polyfills on explicit changes
The newly introduced incremental bundler result caching is now used for server polyfills. This allows the bundling steps to be skipped in watch mode when no related files have been modified. (cherry picked from commit 51351bf)
1 parent 1f7156b commit 28d9ab8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/angular_devkit/build_angular/src/tools/esbuild/application-code-bundle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export function createServerPolyfillBundleOptions(
250250
options: NormalizedApplicationBuildOptions,
251251
target: string[],
252252
sourceFileCache?: SourceFileCache,
253-
): BuildOptions | undefined {
253+
): BundlerOptionsFactory | undefined {
254254
const polyfills: string[] = [];
255255
const zoneFlagsNamespace = 'angular:zone-flags/placeholder';
256256
const polyfillsFromConfig = new Set(options.polyfills);
@@ -329,7 +329,7 @@ export function createServerPolyfillBundleOptions(
329329

330330
buildOptions.plugins.push(createRxjsEsmResolutionPlugin());
331331

332-
return buildOptions;
332+
return () => buildOptions;
333333
}
334334

335335
function getEsBuildCommonOptions(options: NormalizedApplicationBuildOptions): BuildOptions {

0 commit comments

Comments
 (0)