Skip to content

fix(@angular/build): only use external packages for polyfills when no local files are present#32761

Merged
clydin merged 1 commit intoangular:mainfrom
clydin:application/selective-polyfill-bundling
Mar 13, 2026
Merged

fix(@angular/build): only use external packages for polyfills when no local files are present#32761
clydin merged 1 commit intoangular:mainfrom
clydin:application/selective-polyfill-bundling

Conversation

@clydin
Copy link
Member

@clydin clydin commented Mar 12, 2026

The polyfills bundle now conditionally employs external package resolution only if no local files are detected in the polyfills array. If local files are present, all polyfills are bundled together to ensure the import execution order is correctly preserved between local and package-based entries.

@clydin clydin added the target: patch This PR is targeted for the next patch release label Mar 12, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adjusts the polyfill bundling process. A new isLocalFile helper function is introduced to determine if a polyfill entry is a local file path. When a local file is detected among the polyfills, external package resolution is disabled for the polyfills bundle. This forces all polyfills, whether local or from packages, to be bundled together, which preserves their specified execution order. When no local files are in the polyfills list, the behavior respects the configured externalPackages option.

@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Mar 12, 2026
@clydin clydin requested a review from alan-agius4 March 12, 2026 20:24
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 13, 2026
… local files are present

The polyfills bundle now conditionally employs external package resolution
only if no local files are detected in the polyfills array. If local files
are present, all polyfills are bundled together to ensure the import
execution order is correctly preserved between local and package-based
entries.
@clydin clydin force-pushed the application/selective-polyfill-bundling branch from 7aa477c to 78649ae Compare March 13, 2026 15:05
@clydin clydin merged commit 4643a8a into angular:main Mar 13, 2026
35 checks passed
@clydin
Copy link
Member Author

clydin commented Mar 13, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the application/selective-polyfill-bundling branch March 13, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants