解决关于 npm build --prod ,出现 ERROR in budgets, maximum exceeded for initial.
执行命令 :npm build --pord,出现以下错误
WARNING in Invalid background value at 11:14. Ignoring.
WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 3.73 MB.
ERROR in budgets, maximum exceeded for initial. Budget 5 MB was exceeded by 750 kB.
1
2
3
2
3
解决方案: 打开angular.json文件,找到budgets看到这段
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
1
2
3
4
5
6
7
2
3
4
5
6
7
修改相关配置即可