This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17989|Reply: 2

[Angular] Angular build performance optimization

[Copy link]
Posted on 2020-5-12 14:48:33 | | | |
After completing the angular project, you need to compile and publish the project, and you can optimize the project when it is compiled.

angular-cli build command reference:

The hyperlink login is visible.
The hyperlink login is visible.

dev is the default mode when using ng build



ng build is the largest code in the general compression operation

ng build --aot angular precompilation Converts the solid part of the angular into content that the browser can read directly The code is smaller

ng build --prod angular precompile cancel console etc display Merge the same functional code as much as possible Minimize code size

The compiled file sizes are:

22.5 MB (23,696,051 bytes)
20.8 MB (21,826,270 bytes)
3.56 MB (3,738,695 bytes)





Previous:What is the difference between LDAP and AD domains?
Next:Angular ErrorHandler handling mechanism
 Landlord| Posted on 2024-5-29 15:41:39 |
angular 17 no longer supports the --prod parameter, replacing it with the following:

 Landlord| Posted on 2024-7-22 09:46:36 |
ng build --configuration default, depending on the configuration of defaultConfiguration, as shown in the image below:






Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com