Building a Release Version with the CLI

Let's explore how we can build a release version of an application with the Angular CLI.

We'll cover the following

ng build command

The first thing we’re going to be looking at is how we can use the Angular CLI (hopefully, by now, you know how helpful the Angular CLI is) to create a production build.

So far, we’ve seen commands such as ng serve and ng test that we can use to either run the application locally in the browser or run through all our unit tests. There is another command we can run in the CLI that will create a release version of the application. The new command is as follows:

ng build

This will take our application code and make a release build in a new folder, which can be found in the dist folder in the project tree.

📝 Note: Click the terminal window and see what happens!

Get hands-on with 1200+ tech skills courses.