Hey developers! Is your Angular application taking too long to build? If you have around 1000 components, then it may take as long as 2 hours to finish the build time. In this article, I will show you how to reduce Angular application build time. Let’s begin.
Prerequisite
- Angular Project should be up and running (Learn How)
STEP 1: Download Custom Webpack From NPM
First, you need to install an NPM library called custom webpack. But you need to make sure it is compatible with your Angular CLI version. Get the install command from here.
You need to go to the versions tab and get the one that is close to the version of angular CLI of your project. For instance, my Angular CLI version is 11. Hence, I used the command:
Execute the command in your project’s terminal.
STEP 2: Make Changes in angular.json File
Next, open ‘angular.json’ file and make the following changes inside it.
Simply add the ‘builder’ and ‘options’ snippets inside ‘build’ object. Leave the rest as it is.
STEP 3: Create Config File to Reduce Application Build Time
Next, you need to create a file named “extra-webpack.config.js” and keep it in the same folder as “angular.json”.
Add the following code snippet inside the “extra-webpack.config.js” file:
This would already be making a good impact on reducing the build time of your angular application.
STEP 4: Further Reducing Angular Application Build Time
Furthermore, you need to install another NPM library called Terser. Execute the following command to install terser (if you don’t have it already).
Lastly, add the following snippet in your “package.json” file.
And we are done!
I hope this tutorial helped you learn how to reduce Angular application build time. You may also want to learn Lazy Loading in Angular 9 or how to deploy Angular website to S3 bucket.
Have a great one!
Recent Posts
- What_separates_casino_casinia_from_another_standard_online_casino_review
- Financial_flexibility_explore_payday_loans_benefits_and_alternatives_for_immedia
- Waar_jackbit_casino_helpt_bij_het_inschatten_van_speltempo,_regels_en_uitbetaling
- Supportive_resources_around_payday_loans_near_me_for_tackling_unexpected_expense
- Pin Up – Azrbaycann n yax kazinosu Rsmi sayt.6933 (3)
Recent Comments
Archives
- June 2026
- May 2026
- October 2025
- October 2024
- September 2024
- August 2024
- June 2024
- January 2024
- November 2023
- October 2023
- September 2023
- August 2023
- June 2023
- May 2023
- March 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
Categories
- 21
- aks 18
- aks 28
- Angular
- AWS
- Backend Development
- Big Data
- Blog
- Cloud
- crypto 01
- crypto 20
- crypto 20.05
- crypto 21.05
- crypto 29
- Database
- Deployment
- DevOps
- Docker
- fi
- Frontend Development
- GitHub
- Google Cloud Platform
- hu
- Installations
- it
- Java
- JavaScript
- Linux
- MySQL
- Networking
- News
- nl
- no
- NodeJS
- Online casino
- Operating System
- Post
- Python
- Python Flask
- Report
- Security
- Server
- SpringBoot
- Subdomain
- TypeScript
- Uncategorized
- VSCode
- Webhosting
- WordPress
Search
Recent Post
What_separates_casino_casinia_from_another_standard_online_casino_review
- 14 June, 2026
- 4 min read
Financial_flexibility_explore_payday_loans_benefits_and_alternatives_for_immedia
- 13 June, 2026
- 8 min read
Waar_jackbit_casino_helpt_bij_het_inschatten_van_speltempo,_regels_en_uitbetaling
- 13 June, 2026
- 5 min read