2

在制作我的文件时正在使用

npm run build -- --c prod

npm run build -- --c --prod

以上我需要的 --prod 和 prod 区别,虽然运行两者一直在运行,但是 --prod 快速并且 prod 系统挂起并且需要时间,任何人都可以澄清我在命令提示符下使用 (--)

4

1 回答 1

0

--prod选项将使Angular 使应用程序的大小变得更小。这就是 --prod 更快的原因。

从文档:

--prod=true|false   
Shorthand for "--configuration=production". When true, sets the build configuration to the production target. By default, the production target is set up in the workspace configuration such that all builds make use of bundling, limited tree-shaking, and also limited dead code elimination.

对于 < 角 5:

ng build --prod --build-optimizer

于 2019-06-07T05:55:02.997 回答