-
Notifications
You must be signed in to change notification settings - Fork 12k
feat(@angular/cli): Ability to specify budgets for your apps #8939
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
Conversation
f9e2e54
to
4f1ae22
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round.
}; | ||
} | ||
if (budget.maximumError) { | ||
thresholds = { ...thresholds, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make a copy of thresholds
instead of just adding a new property? This is confusing to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Immutability habit, updated.
} | ||
|
||
budgets.map(budget => { | ||
const thresholds = this.calcualteThresholds(budget); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calcualte
here and below.
*/ | ||
export type BudgetType = 'all' | 'allScript' | 'any' | 'anyScript' | 'bundle' | 'initial'; | ||
|
||
export interface Budget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reuse the config .d.ts
for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, those values aren't exported separately. I could do it by hand, but when it gets regenerated it would get lost.
|
||
## NOTES | ||
|
||
All sized are relative to baseline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a typo? It seems like this was meant to read "All sizes are relative to baseline".
a945c12
to
bb4be8c
Compare
9e2c7dd
to
5e8553d
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #7139