Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
WARNING in Exceeded maximum budget for SCSS FILE IN ANGULAR

angular error

IMPORTING BOOTSTRAP VARIABLE in scss file getting error WARNING in Exceeded maximum budget for B:/Angular-8/crats-shop/src/app/shared/components/sort/sort.component.scss. Budget 6 kB was not met by 136 kB with a total of 142 kB

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Open angular.json file and find budgets keyword and increase value of type anyComponentStyle:

{
  "type": "anyComponentStyle",
  "maximumWarning": "150kb",
  "maximumError": "150kb"
}
over 4 years ago · Santiago Trujillo Report

0

Even though you can just bump up your limits, it's probably not what you want to do. The limits are there for a reason. You should try to avoid exceeding them in the first place if possible.

For me, the problem was I was importing my theme file (which was quite large) into my components' SCSS files.

@import "src/my-theme";

The only reason for that was that I needed to access my SCSS color variables within those files. It's a terrible idea to import any larger file in multiple of your styles only to access a few of your variables; your application will become huge and really slow to load.

If you only need access to your variables, I suggest this solution:

  1. in your theme file, make CSS variables like so: :root { --primary-color: #11dd11; }
  2. remove the import from your other SCSS files and use this to get your color instead: var(--primary-color)
over 4 years ago · Santiago Trujillo Report

0

budget is a group of limits to certain values that affect site performance

Open angular.json file and find budgets keyword and increase value

"budgets": [
   {
      "type": "initial",
      "maximumWarning": "4mb", <===
      "maximumError": "5mb"
   },
   {
      "type": "anyComponentStyle",
      "maximumWarning": "150kb",
      "maximumError": "150kb"
   }
]
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!