Skip to content
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

Option to update budgets when building app or export list of initial chunk files #27941

Open
rubiesonthesky opened this issue Jun 26, 2024 · 1 comment
Labels
angular/build:application area: angular/build feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature

Comments

@rubiesonthesky
Copy link

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:

name = basename(entry.entryPoint)
.replace(/\.[cm]?[jt]s$/, '')
.replace(/[\\/.]/g, '-');

Copy link
Contributor

angular-robot bot commented Jun 27, 2024

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.

@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular/build:application area: angular/build feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants