Optimizing the application bundle
As we learned in the Building an Angular application section, the Angular CLI performs optimization techniques when we build an Angular application. The optimization process that is performed in the application code includes modern web techniques and tools, including the following:
- Minification: Converts multiline source files into a single line removing whitespaces and comments. It is a process that enables browsers to parse them faster later on.
- Uglification: Renames properties and methods to a non-human-readable form so that they are difficult to understand and used for malicious purposes.
- Bundling: Concatenates all source files of the application into a single file, called the bundle.
- Tree-shaking: Removes unused files and Angular artifacts, such as components and services, resulting in a smaller bundle.
- Font optimization: Inlines external font files in the main HTML file of the application...