1

I have an Angular app and the dashboard page calls a number of APIs to fetch data from backend (almost 10 APIs on page load - OnInit). The data takes a few seconds to load. How can I optimize it? Does the below warning have anything to do with the delay in data loading?

Warning: xxx.component.scss exceeded maximum budget. Budget 2.00 kB was not met by 217 bytes with a total of 2.21 kB.

Warning: bundle initial exceeded maximum budget. Budget 500.00 kB was not met by 1.10 MB with a total of 1.58 MB.

Thank you

1
  • 2
    First to someone to answer this question you'll have to show your code. Without seeing how your code looks nobody can able to answer. This has nothing to do with your warning messages. If you go to your angular.json file you can see a property called budgets and see the maximum budget size you have specified .If your application build size goes beyond this specified size it throws a warning. Commented Jan 21, 2022 at 4:01

1 Answer 1

2

The warning that you have been seen does not relate to the API calls, but a definition on angular.json file.

As you might see here how to change that: Angular.io

Just increase the maximum bundle size of your angular app.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.