gpt4 book ai didi

angular-cli - Angular `ng serve --prod` 与 `ng serve -c production` 相同吗?

转载 作者:行者123 更新时间:2023-12-05 02:14:05 27 4
gpt4 key购买 nike

我正在使用 Angular 7,我想知道是否

ng serve --prod

相同
ng serve -c production

在文档中找不到,所以任何帮助将不胜感激

最佳答案

这里有一些文档:https://angular.io/cli/build

它说 -c--configuration 的别名

A named build target, as specified in the "configurations" section of angular.json. Each named target is accompanied by a configuration of option defaults for that target.

Aliases: -c

--prod 的文档说:

When true, sets the build configuration to the production target. All builds make use of bundling and limited tree-shaking. A production build also runs limited dead code elimination.

所以我觉得这听起来是一样的。

关于angular-cli - Angular `ng serve --prod` 与 `ng serve -c production` 相同吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54316782/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com