how to change the dist-folder path in angular-cli after 'ng build'

cuppy picture cuppy · May 20, 2016 · Viewed 138.5k times · Source

I would like to use angular-cli with asp.net core and I need to know how I can change the path of the dist folder

Answer

Meligy picture Meligy · Oct 19, 2016

The more current way of this is to update the outDir property in .angular-cli.json.

The ng buildcommand argument --output-path (or -op for short) is still supported also, which can be useful if you want multiple values, you can save them in your package.json as npm scripts.

Beware: The .angular-cli.json property is NOT called output-path like the currently-accepted answer by @cwill747 says. That's the ng build argument only.

It's called outDir as mentioned above, and it's a under the apps property.

.

P.S.

(December 2017)

1-year after adding this answer, someone added a new answer with essentially same information, and the Original Poster changed the accepted answer to the 1-year-late answer containing same information in the first line of this one.