Closed squelix closed 4 months ago
@squelix, can you please share your budgets config?
This is my budgets config:
"budgets": [
{
"type": "initial",
"baseline": "1mb",
"maximumWarning": "500kb",
"maximumError": "1.5mb"
},
{
"type": "bundle",
"name": "polyfills",
"baseline": "150kb",
"maximumWarning": "50kb",
"maximumError": "100kb"
},
{
"type": "bundle",
"name": "styles",
"baseline": "280kb",
"maximumWarning": "100kb",
"maximumError": "200kb"
},
{
"type": "bundle",
"name": "main",
"baseline": "1mb",
"maximumWarning": "100kb",
"maximumError": "200kb"
},
{
"type": "anyComponentStyle",
"baseline": "1kb",
"maximumWarning": "1kb",
"maximumError": "5kb"
}
]
@squelix, thanks for the above, but I am still unable to replicate your problem.
Application bundle generation failed. [2.480 seconds]
▲ [WARNING] bundle initial exceeded maximum budget. Budget 2.05 kB was not met by 1.45 MB with a total of 1.45 MB.
▲ [WARNING] polyfills exceeded maximum budget. Budget 52.22 kB was not met by 35.90 kB with a total of 88.13 kB.
▲ [WARNING] styles exceeded maximum budget. Budget 2.05 kB was not met by 6.95 kB with a total of 9.00 kB.
▲ [WARNING] main exceeded maximum budget. Budget 103.42 kB was not met by 1.25 MB with a total of 1.36 MB.
✘ [ERROR] main exceeded maximum budget. Budget 205.82 kB was not met by 1.15 MB with a total of 1.36 MB.
✘ [ERROR] src/app/home/home.component.css exceeded maximum budget. Budget 2.05 kB was not met by 6.93 kB with a total of 8.98 kB.
✘ [ERROR] src/app/app.component.css exceeded maximum budget. Budget 2.05 kB was not met by 40.10 kB with a total of 42.15 kB.
With more investigation, if i have this configuration in my angular.json
the error appears but when i'm removing all the sourceMap
section everything is working fine.
"sourceMap": {
"hidden": false,
"scripts": true,
"styles": true,
"vendor": true
}
I think that the builder compute the budget of the sourcemap files.
@alan-agius4 This is a repro repo => https://github.com/squelix/undefined-budget-angular-repro if you run npm run build:prod you can see undefined in the console.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Command
build
Is this a regression?
The previous version in which this bug was not present was
v18.0.7
Description
Since I've updated from Angular 18.0.7 to 18.1.0, when, I'm building my application
ng build
, I have some errors in the console on the budget but when the error is in a componentStyle which is inlined in the component the name of the file isundefined
.Minimal Reproduction
I'm running
ng build
in production mode.My packages:
I didn't change my code, I only updated Angular to 18.1.0.
Exception or Error
Your Environment
Anything else relevant?
No response