angular8打包时提示ERROR in Child compilation failed:解决方案

在打包我自己的angular项目时出现了错误

ERROR in Child compilation failed:
undefined
ERROR in budgets, maximum exceeded for F:/angular/demo/mjcomm/src/app/editor/editor.component.css. Budget 10 kB was exceeded by 5.43 kB.
ERROR in budgets, maximum exceeded for F:/angular/demo/mjcomm/src/app/chat/chat.component.css. Budget 10 kB was exceeded by 5.8 kB.

原因是这两个组件我加入了富文本编辑器,富文本编辑器的样式大小超过了angular打包单个模版css的限制,在根目录中找到angular.json并找到budgets

 

 将maximumWarning和maximumError调大就好了

 

posted @ 2020-01-02 15:00  #Rao  阅读(515)  评论(0编辑  收藏  举报