小编Mas*_*mar的帖子

预算中的警告,最初超过最大值

使用--prod构建我的角度7项目时,我在预算中有一个警告.

我有一个角度7项目,我想建立它,但我有一个警告:

WARNING in budgets, maximum exceeded for initial. Budget 2 MB was exceeded by 1.77 MB
Run Code Online (Sandbox Code Playgroud)

这些都是块状细节:

chunk {scripts} scripts.2cc9101aa9ed72da1ec4.js (scripts) 154 kB  [rendered]
chunk {0} runtime.ec2944dd8b20ec099bf3.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.13d1eb792af7c2f359ed.js (main) 3.34 MB [initial] [rendered]
chunk {2} polyfills.11b1e0c77d01e41acbba.js (polyfills) 58.2 kB [initial] [rendered]
chunk {3} styles.33b11ad61bf10bb992bb.css (styles) 379 kB [initial] [rendered]
Run Code Online (Sandbox Code Playgroud)

预算究竟是什么?我该如何管理它们?

production build angular ng-build

57
推荐指数
5
解决办法
3万
查看次数

将 angular 7 升级到 8,错误:this.typeChecker.getTypeArguments 不是构建库上的函数

根据本指南升级我的复杂项目后:

当我构建我的库时,我收到了这个错误:

Building Angular Package

------------------------------------------------------------------------------
Building entry point 'my-library'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
ERROR: this.typeChecker.getTypeArguments is not a function
An unhandled exception occurred: this.typeChecker.getTypeArguments is not a function
See "XXXXXX\angular-errors.log" for further details.
Run Code Online (Sandbox Code Playgroud)

我在全球范围内更新 Node.js、Typescript 和 Ancular.Cli

所有步骤都成功完成。

我应该做些什么来单独升级我的图书馆吗?

更新:

要构建我将此命令ng build my-library-name与此包一起使用ng-packagr": "^5.4.0

所有库都在一个项目中,并使用 ng update 进行项目升级

节点版本:12.14.1,打字稿版本:3.4.5

upgrade angular angular-library angular7 angular8

5
推荐指数
1
解决办法
2016
查看次数