我想在 asp.net core 中使用 angular-cli,我需要知道如何更改 dist 文件夹的路径
最佳答案
目前更流行的方法是更新 angular.json
中的 outDir
属性(在旧版本中称为 .angular-cli.json
Angular CLI 版本)。
ng build
命令参数 --output-path
(或简称 -op
)也仍然受支持,这很有用如果您需要多个值,可以将它们作为 npm 脚本保存在 package.json
中。
Beware: The
.angular-cli.json
property is NOT calledoutput-path
like the currently-accepted answer by @cwill747 says. That's theng build
argument only.It's called
outDir
as mentioned above, and it's a under theapps
property.
.
附言
(2017 年 12 月)
添加此答案 1 年后,有人添加了一个包含基本相同信息的新答案,并且原始发帖人将接受的答案更改为第一个包含相同信息的迟到 1 年的答案这一行。
关于angular - 如何在 'ng build' 之后更改 angular-cli 中的 dist 文件夹路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37348045/