angular-cli
angular-cli copied to clipboard
Option to update budgets when building app or export list of initial chunk files
Command
build
Description
When updating app, it would be nice to have a easy way to update application budgets in angular.json file. With Angular 18 and new @angular/build:application builder it's no longer possible to script this task.
I understand that this may be niche feature request. But tracking budgets helps to see, how the size changes overtime.
Describe the solution you'd like
When I run build, I'd like to have cli option that would update angular.json file and the budgets section. It's tedious to update that file manually.
Describe alternatives you've considered
I have a script for this task but it does not work with the new builder. The produced stats.json does not have enough information. There is no information which chunks are initial and which are loaded later. Also, I'm not sure how I could map the chunks to budgets in angular.json. Before the stats.json had the same chunkName and it could be just compared with the angular.json file.
This method was also nice, because I could print table that compared the values from angular.json and stats.json and see difference.
Is there a way to expose the data that builder clearly has when it prints the output table? With that data, I could update my script to work.
At least there seems to be a way to convert entryPoint to chunkName: https://github.com/angular/angular-cli/blob/5b81e0f310609ceefaa09342722163233c14b47c/packages/angular/build/src/tools/esbuild/budget-stats.ts#L46-L48
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.
You can find more details about the feature request process in our documentation.
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Closing this for now due to limited interest from the community. We can revisit the idea in the future if demand increases.
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.