bundle initial exceeded maximum budget. Budget 1.00 MB was not met by 642.91 kB with a total of 1.63

Angular 项目迁移后第一次 build 打包后抛出了如下的异常提示:

bundle initial exceeded maximum budget. Budget 1.00 MB was not met by 642.91 kB with a total of 1.63 MB.

大致意思是 build 的文件大小已超出了初始设定的范围;

解决办法

在项目工程中的 angular.json 中修改内存的参数设定值即可,具体 code 如下:

 

"budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                },
                {
                  "type": "anyComponentStyle",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                }
              ],

修改其参数后,重新尝试 build 即可.


以上便是此次分享的全部内容,希望能对大家有所帮助!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值