Building an Angular application
To build an Angular application, we use the following command of the Angular CLI:
ng build
The build process boots up the Angular compiler that primarily collects all TypeScript and HTML files of our application code and converts them into JavaScript. CSS stylesheet files such as SCSS are converted into pure CSS files. The build process ensures a fast and optimal rendering of our application in the browser.
An Angular application contains various TypeScript files not generally used during runtime, such as unit tests or tooling helpers. How does the compiler know which files to collect for the build process? It reads the files
property of the tsconfig.app.json
file that indicates the main entry point of the Angular application:
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "...