The default setup for an Angular application configured using the Angular CLI already contains a number of options that can be used in a production setting. One of these options is the outputPath property, which specifies where compiled JavaScript files are written to. By using a separate path for output files, we know that we can distribute the contents of this directory as a fully working version of our site.
The outputPath option can be found in the angular.json file, under the Projects | Angular-sample | Architect | Build | Options configuration section. This property is, by default, set to "dist/angular-sample", and therefore, when we issue an ng build command, we will notice that the Angular CLI will generate a number of files in this directory. These include main.js, polyfill.js, runtime.js, styles.js, and vendor.js. These JavaScript...