mirror of
https://github.com/angular/angular-cli.git
synced 2026-03-20 04:45:00 +00:00
Page:
stories budgets
Pages
1 x angular cli
1 x build
1 x config
1 x doc
1 x e2e
1 x eject
1 x generate class
1 x generate component
1 x generate directive
1 x generate enum
1 x generate guard
1 x generate interface
1 x generate module
1 x generate pipe
1 x generate service
1 x generate
1 x home
1 x lint
1 x new
1 x serve
1 x stories 1.0 update
1 x stories application environments
1 x stories asset configuration
1 x stories autocompletion
1 x stories autoprefixer
1 x stories budgets
1 x stories code coverage
1 x stories configure hmr
1 x stories continuous integration
1 x stories css preprocessors
1 x stories disk serve
1 x stories github pages
1 x stories global lib
1 x stories global scripts
1 x stories global styles
1 x stories include angular flex
1 x stories include angular material
1 x stories include angularfire
1 x stories include bootstrap
1 x stories include font awesome
1 x stories internationalization
1 x stories linked library
1 x stories moving into the cli
1 x stories moving out of the cli
1 x stories multiple apps
1 x stories proxy
1 x stories routing
1 x stories third party lib
1 x stories universal rendering
1 x stories using corporate proxy
1 x stories
1 x test
1 x update
1 x xi18n
Home
Upgrading from Beta.10 to Beta.12
Upgrading from Beta.10 to Beta.14
add
angular cli
angular workspace
build
config
doc
e2e
eject
generate app shell
generate application
generate class
generate component
generate directive
generate enum
generate guard
generate interface
generate library
generate module
generate pipe
generate service
generate universal
generate
help
lint
new
run
serve
stories 1.0 update
stories app shell
stories application environments
stories asset configuration
stories autocompletion
stories autoprefixer
stories budgets
stories code coverage
stories configure hmr
stories continuous integration
stories create library
stories css preprocessors
stories disk serve
stories github pages
stories global lib
stories global scripts
stories global styles
stories include angular flex
stories include angular material
stories include angularfire
stories include bootstrap
stories include font awesome
stories internationalization
stories linked library
stories moving into the cli
stories moving out of the cli
stories multiple apps
stories multiple projects
stories proxy
stories rc update
stories rc.0 update
stories routing
stories third party lib
stories universal rendering
stories using corporate proxy
stories
test
update
version
xi18n
No results
4
stories budgets
Judy Bogart edited this page 2019-04-01 14:30:50 -07:00
Table of Contents
This content applies to v6 and is no longer being maintained. For v7 and later, see current documentation here.
Budgets
As applications grow in functionality, they also grow in size. Budgets is a feature in the Angular CLI which allows you to set budget thresholds in your configuration to ensure parts of your application stay within boundries which you set.
angular.json
{
...
"configurations": {
"production": {
...
budgets: []
}
}
}
Budget Definition
- type
- The type of budget.
- Possible values:
- bundle - The size of a specific bundle.
- initial - The initial size of the app.
- allScript - The size of all scripts.
- all - The size of the entire app.
- anyScript - The size of any one script.
- any - The size of any file.
- name
- The name of the bundle.
- Required only for type of "bundle"
- baseline
- The baseline size for comparison.
- maximumWarning
- The maximum threshold for warning relative to the baseline.
- maximumError
- The maximum threshold for error relative to the baseline.
- minimumWarning
- The minimum threshold for warning relative to the baseline.
- minimumError
- The minimum threshold for error relative to the baseline.
- warning
- The threshold for warning relative to the baseline (min & max).
- error
- The threshold for error relative to the baseline (min & max).
Specifying sizes
Available formats:
123- size in bytes123b- size in bytes123kb- size in kilobytes123mb- size in megabytes12%- percentage
NOTES
All sizes are relative to baseline. Percentages are not valid for baseline values.