Skip to content

feat(@angular-devkit/build-angular): remove bundleDependencies from server builder #23947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Sep 23, 2022

This commit removes the usages of bundleDependencies which does not correctly work as webpack will use require to import ESM module since we configure the server bundle to be outputted in CJS. Migrating fully to ESM is also currently not viable due to the lack of support from Domino.
Even if full ESM was possible, using this option would have resulted in a runtime overhead as Angular libraries would be linked during runtime instead of compile time.

BREAKING CHANGE:
The server builder bundleDependencies option has been removed. This option was used pre Ivy. Currently, using this option is unlikely to produce working server bundles.

The externalDependencies option can be used instead to exclude specific node_module packages from the final bundle.

Closes #23905

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Sep 23, 2022
@alan-agius4 alan-agius4 force-pushed the remove-bundleDependencies branch from 23ff89f to 363e688 Compare September 23, 2022 08:00
@alan-agius4 alan-agius4 requested a review from clydin September 23, 2022 08:37
@alan-agius4 alan-agius4 added this to the v15 Feature Freeze milestone Sep 23, 2022
@alan-agius4 alan-agius4 force-pushed the remove-bundleDependencies branch from 363e688 to 84b158e Compare September 23, 2022 14:28
@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 Sep 23, 2022
… server builder

This commit removes the usages of `bundleDependencies` which does not correctly work as webpack will use `require` to import ESM module since we configure the server bundle to be outputted in CJS. Migrating fully to ESM is also currently not viable due to the lack of support from Domino.
Even if full ESM was possible, using this option would have resulted in a runtime overhead as Angular libraries would be linked during runtime instead of compile time.

BREAKING CHANGE:
The server builder `bundleDependencies` option has been removed. This option was used pre Ivy. Currently, using this option is unlikely to produce working server bundles.

The `externalDependencies` option can be used instead to exclude specific node_module packages from the final bundle.

Closes angular#23905
@alan-agius4 alan-agius4 force-pushed the remove-bundleDependencies branch from 84b158e to 8409672 Compare September 23, 2022 18:54
@angular-robot angular-robot bot added the feature Issue that requests a new feature label Sep 23, 2022
@clydin clydin merged commit 9c13fce into angular:main Sep 23, 2022
@alan-agius4 alan-agius4 deleted the remove-bundleDependencies branch September 23, 2022 19:49
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker feature Issue that requests a new feature flag: breaking change target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bundleDependencies option does not support false in angular 13/14.
2 participants