WARNING in budgets, maximum exceeded for initial
When build my angular 7 project with --prod, i have a warning in budgets.
I have a angular 7 project, i want to build it, but i have a warning:
WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 1.77 MB
these are chunk details:
chunk {scripts} scripts.2cc9101aa9ed72da1ec4.js (scripts) 154 kB [rendered]
chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.13d1eb792af7c2f359ed.js (main) 3.34 MB [initial] [rendered]
chunk {2} polyfills.11b1e0c77d01e41acbba.js (polyfills) 58.2 kB [initial] [rendered]
chunk {3} styles.33b11ad61bf10bb992bb.css (styles) 379 kB [initial] [rendered]
what exactly are budgets? and how should i manage them?
angular build production ng-build
add a comment |
When build my angular 7 project with --prod, i have a warning in budgets.
I have a angular 7 project, i want to build it, but i have a warning:
WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 1.77 MB
these are chunk details:
chunk {scripts} scripts.2cc9101aa9ed72da1ec4.js (scripts) 154 kB [rendered]
chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.13d1eb792af7c2f359ed.js (main) 3.34 MB [initial] [rendered]
chunk {2} polyfills.11b1e0c77d01e41acbba.js (polyfills) 58.2 kB [initial] [rendered]
chunk {3} styles.33b11ad61bf10bb992bb.css (styles) 379 kB [initial] [rendered]
what exactly are budgets? and how should i manage them?
angular build production ng-build
add a comment |
When build my angular 7 project with --prod, i have a warning in budgets.
I have a angular 7 project, i want to build it, but i have a warning:
WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 1.77 MB
these are chunk details:
chunk {scripts} scripts.2cc9101aa9ed72da1ec4.js (scripts) 154 kB [rendered]
chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.13d1eb792af7c2f359ed.js (main) 3.34 MB [initial] [rendered]
chunk {2} polyfills.11b1e0c77d01e41acbba.js (polyfills) 58.2 kB [initial] [rendered]
chunk {3} styles.33b11ad61bf10bb992bb.css (styles) 379 kB [initial] [rendered]
what exactly are budgets? and how should i manage them?
angular build production ng-build
When build my angular 7 project with --prod, i have a warning in budgets.
I have a angular 7 project, i want to build it, but i have a warning:
WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 1.77 MB
these are chunk details:
chunk {scripts} scripts.2cc9101aa9ed72da1ec4.js (scripts) 154 kB [rendered]
chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.13d1eb792af7c2f359ed.js (main) 3.34 MB [initial] [rendered]
chunk {2} polyfills.11b1e0c77d01e41acbba.js (polyfills) 58.2 kB [initial] [rendered]
chunk {3} styles.33b11ad61bf10bb992bb.css (styles) 379 kB [initial] [rendered]
what exactly are budgets? and how should i manage them?
angular build production ng-build
angular build production ng-build
asked Jan 1 at 13:44
Masoud BimarMasoud Bimar
4910
4910
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Open angular.json file and find budgets
keyword.
It should look like:
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
As you’ve probably guessed you can increase the maximumWarning
value to prevent this warning, i.e.:
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb", <===
"maximumError": "5mb"
}
]
What does budgets mean?
A performance budget is a group of limits to certain values that
affect site performance, that may not be exceeded in the design and
development of any web project.
In our case budget is the limit for bundle sizes.
See also:
- https://github.com/webpack/webpack/issues/3216
Can you explain what does budget means?
– Stack Overflow
Jan 16 at 6:43
1
@StackOverflow Added
– yurzui
Jan 16 at 6:49
Thanks @yurzui for your quick answer, Is it new feature in angular 7? We didn't see this error in angular 5. Does it means we are doing something wrong?
– Stack Overflow
Jan 16 at 6:57
1
@StackOverflow Was added in@angular/cli@7
See also what's new in ng7 here blog.angular.io/…With v7, we are also defaulting new projects to take advantage of Bundle Budgets in our CLI.
– yurzui
Jan 16 at 6:58
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53995948%2fwarning-in-budgets-maximum-exceeded-for-initial%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Open angular.json file and find budgets
keyword.
It should look like:
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
As you’ve probably guessed you can increase the maximumWarning
value to prevent this warning, i.e.:
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb", <===
"maximumError": "5mb"
}
]
What does budgets mean?
A performance budget is a group of limits to certain values that
affect site performance, that may not be exceeded in the design and
development of any web project.
In our case budget is the limit for bundle sizes.
See also:
- https://github.com/webpack/webpack/issues/3216
Can you explain what does budget means?
– Stack Overflow
Jan 16 at 6:43
1
@StackOverflow Added
– yurzui
Jan 16 at 6:49
Thanks @yurzui for your quick answer, Is it new feature in angular 7? We didn't see this error in angular 5. Does it means we are doing something wrong?
– Stack Overflow
Jan 16 at 6:57
1
@StackOverflow Was added in@angular/cli@7
See also what's new in ng7 here blog.angular.io/…With v7, we are also defaulting new projects to take advantage of Bundle Budgets in our CLI.
– yurzui
Jan 16 at 6:58
add a comment |
Open angular.json file and find budgets
keyword.
It should look like:
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
As you’ve probably guessed you can increase the maximumWarning
value to prevent this warning, i.e.:
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb", <===
"maximumError": "5mb"
}
]
What does budgets mean?
A performance budget is a group of limits to certain values that
affect site performance, that may not be exceeded in the design and
development of any web project.
In our case budget is the limit for bundle sizes.
See also:
- https://github.com/webpack/webpack/issues/3216
Can you explain what does budget means?
– Stack Overflow
Jan 16 at 6:43
1
@StackOverflow Added
– yurzui
Jan 16 at 6:49
Thanks @yurzui for your quick answer, Is it new feature in angular 7? We didn't see this error in angular 5. Does it means we are doing something wrong?
– Stack Overflow
Jan 16 at 6:57
1
@StackOverflow Was added in@angular/cli@7
See also what's new in ng7 here blog.angular.io/…With v7, we are also defaulting new projects to take advantage of Bundle Budgets in our CLI.
– yurzui
Jan 16 at 6:58
add a comment |
Open angular.json file and find budgets
keyword.
It should look like:
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
As you’ve probably guessed you can increase the maximumWarning
value to prevent this warning, i.e.:
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb", <===
"maximumError": "5mb"
}
]
What does budgets mean?
A performance budget is a group of limits to certain values that
affect site performance, that may not be exceeded in the design and
development of any web project.
In our case budget is the limit for bundle sizes.
See also:
- https://github.com/webpack/webpack/issues/3216
Open angular.json file and find budgets
keyword.
It should look like:
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
As you’ve probably guessed you can increase the maximumWarning
value to prevent this warning, i.e.:
"budgets": [
{
"type": "initial",
"maximumWarning": "4mb", <===
"maximumError": "5mb"
}
]
What does budgets mean?
A performance budget is a group of limits to certain values that
affect site performance, that may not be exceeded in the design and
development of any web project.
In our case budget is the limit for bundle sizes.
See also:
- https://github.com/webpack/webpack/issues/3216
edited Jan 16 at 6:49
answered Jan 1 at 13:50
yurzuiyurzui
99.6k11199219
99.6k11199219
Can you explain what does budget means?
– Stack Overflow
Jan 16 at 6:43
1
@StackOverflow Added
– yurzui
Jan 16 at 6:49
Thanks @yurzui for your quick answer, Is it new feature in angular 7? We didn't see this error in angular 5. Does it means we are doing something wrong?
– Stack Overflow
Jan 16 at 6:57
1
@StackOverflow Was added in@angular/cli@7
See also what's new in ng7 here blog.angular.io/…With v7, we are also defaulting new projects to take advantage of Bundle Budgets in our CLI.
– yurzui
Jan 16 at 6:58
add a comment |
Can you explain what does budget means?
– Stack Overflow
Jan 16 at 6:43
1
@StackOverflow Added
– yurzui
Jan 16 at 6:49
Thanks @yurzui for your quick answer, Is it new feature in angular 7? We didn't see this error in angular 5. Does it means we are doing something wrong?
– Stack Overflow
Jan 16 at 6:57
1
@StackOverflow Was added in@angular/cli@7
See also what's new in ng7 here blog.angular.io/…With v7, we are also defaulting new projects to take advantage of Bundle Budgets in our CLI.
– yurzui
Jan 16 at 6:58
Can you explain what does budget means?
– Stack Overflow
Jan 16 at 6:43
Can you explain what does budget means?
– Stack Overflow
Jan 16 at 6:43
1
1
@StackOverflow Added
– yurzui
Jan 16 at 6:49
@StackOverflow Added
– yurzui
Jan 16 at 6:49
Thanks @yurzui for your quick answer, Is it new feature in angular 7? We didn't see this error in angular 5. Does it means we are doing something wrong?
– Stack Overflow
Jan 16 at 6:57
Thanks @yurzui for your quick answer, Is it new feature in angular 7? We didn't see this error in angular 5. Does it means we are doing something wrong?
– Stack Overflow
Jan 16 at 6:57
1
1
@StackOverflow Was added in
@angular/cli@7
See also what's new in ng7 here blog.angular.io/… With v7, we are also defaulting new projects to take advantage of Bundle Budgets in our CLI.
– yurzui
Jan 16 at 6:58
@StackOverflow Was added in
@angular/cli@7
See also what's new in ng7 here blog.angular.io/… With v7, we are also defaulting new projects to take advantage of Bundle Budgets in our CLI.
– yurzui
Jan 16 at 6:58
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53995948%2fwarning-in-budgets-maximum-exceeded-for-initial%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown