Skip to content

fix(@angular-devkit/build-angular): lazy modules bundle budgets#22239

Merged
dgp1130 merged 2 commits intoangular:masterfrom
alan-agius4:bundle-budgets-lazy-loading
Nov 29, 2021
Merged

fix(@angular-devkit/build-angular): lazy modules bundle budgets#22239
dgp1130 merged 2 commits intoangular:masterfrom
alan-agius4:bundle-budgets-lazy-loading

Conversation

@alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Nov 26, 2021

Since the introduction of Webpack 5 in version 12 bundle budgets for lazy chunks have been broken due to the removal of the NamedLazyChunksPlugin.

With this change we re-introduce a similar plugin to allow setting bundle budgets on lazy chunks.

This issue has also been reported on Slack by a GDE https://angular-team.slack.com/archives/C08M4JKNH/p1637115196222300

Closes: #11019

…est to use new test harness

With this change we replace the bundle budgets specs to use the new test harness.
@google-cla google-cla bot added the cla: yes label Nov 26, 2021
@alan-agius4 alan-agius4 requested a review from clydin November 26, 2021 15:48
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Nov 26, 2021
@alan-agius4 alan-agius4 requested a review from dgp1130 November 26, 2021 15:48
Since the introduction of Webpack 5 in version 12 bundle budgets for lazy chunks  have been broken due to the removal of the `NamedLazyChunksPlugin`. https://github.com/angular/angular-cli/blob/21a49e6492dda1c4a325c0339518c3c110880d02/packages/angular_devkit/build_angular/src/webpack/plugins/named-chunks-plugin.ts#L8

With this change we re-introduce a similar plugin to allow setting bundle budgets on lazy chunks.

This issue has also been reported on Slack by a GDE https://angular-team.slack.com/archives/C08M4JKNH/p1637115196222300

Closes: #11019
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Nov 29, 2021
@alan-agius4 alan-agius4 removed the request for review from clydin November 29, 2021 18:05
@dgp1130 dgp1130 added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Nov 29, 2021
@dgp1130
Copy link
Collaborator

dgp1130 commented Nov 29, 2021

@alan-agius4, this had a merge conflict with 13.0.x, can you make a separate PR for that?

@dgp1130 dgp1130 merged commit 4c288b8 into angular:master Nov 29, 2021
@alan-agius4 alan-agius4 deleted the bundle-budgets-lazy-loading branch December 11, 2021 12:42
@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 Jan 11, 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 target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot set a budget on lazy loaded modules with ng cli 6.0.0

2 participants