An easy way to do this is to add a “build-all” target to your package.json, that you would run with npm start build-all. That command would have to build each environment and then deploy it before building the next one, something along those lines:

ng build — env=dev; cp dist/* deploy; ng build — env=qa; cp dist/* prod-deploy;

The key here is the semi-colon to chain all those instructions into one command.

Google Developer Expert in Angular, Consultant and Trainer at http://www.angulartraining.com

Google Developer Expert in Angular, Consultant and Trainer at http://www.angulartraining.com