I have an Angular 2 project generated with the Angular CLI (by typing ng new myProject).
How can I configure the build location, so after the build I will have a separate folder with all HTML, JS and other resources?
2 Steps:
(In this case the build will be located in "static" folder one step above project root directory)
angular.json and it is outputPath rather than outDir.The answer by Tomas Marik is correct for cases where you always want to use that output folder. But for cases where you need to be more flexible, you can also override the .angular-cli.json value by specifying it on the command line. This works for both ng build and ng serve:
ng build --output-path ../path/to/use
ng buildis for. If you want to change the output directory, look inangular-cli.json.