Skip to content
Advertisement

Error: bundle initial-es5 exceeded maximum budget. Budget 6.00 MB was not met by 133.51 kB with a total of 6.13 MB

I have an angular application upgraded to 11.

And I do a > ng build --prod

And I see this information:

JavaScript

But I also get this error:

JavaScript

But I already changed the budget size some time ago:

JavaScript

Of course, I could again increase the size. But of course, that is not what you want to do.

And this is my pacakge.json file:

JavaScript

How to decrease the dist folder?

Thank you

Advertisement

Answer

Sometimes when your application grows there is no other option and you have to raise the bulk size constraints in angular.json to compile.

But first you should try removing useless code, dependencies, assets, styles, etc. in order to reduce size.

Also check these tips: https://indepth.dev/posts/1217/how-to-reuse-common-layouts-in-angular-using-router

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement