Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Nov 13, 2025

This commit refactors the dependency handling for the Vitest runner to improve flexibility and correctness, especially for browser-based tests.

The previously hardcoded list of external Angular packages has been removed. Instead, a new externalPackages: true option is passed to the application builder, allowing for more dynamic and configurable externalization of packages. This prevents packages from node_modules from being bundled into the test entry points.

Note: For cases where a dependency should not be pre-bundled, the optimizeDeps.exclude option can be used within a custom runner configuration file.

…e-bundling

This commit refactors the dependency handling for the Vitest runner to improve flexibility and correctness, especially for browser-based tests.

The previously hardcoded list of external Angular packages has been removed. Instead, a new `externalPackages: true` option is passed to the application builder, allowing for more dynamic and configurable externalization of packages. This prevents packages from `node_modules` from being bundled into the test entry points.

Note: For cases where a dependency should not be pre-bundled, the `optimizeDeps.exclude` option can be used within a custom runner configuration file.
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label Nov 13, 2025
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 13, 2025
@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 Nov 13, 2025
@clydin clydin merged commit 6e0f5da into angular:main Nov 13, 2025
35 checks passed
@clydin
Copy link
Member Author

clydin commented Nov 13, 2025

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

@clydin clydin deleted the unit-test/full-prebundling branch November 13, 2025 11:08
yjaaidi added a commit to yjaaidi/angular-cli that referenced this pull request Nov 13, 2025
hybrist pushed a commit that referenced this pull request Nov 14, 2025
hybrist pushed a commit that referenced this pull request Nov 14, 2025
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: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants