angularangular-cli

How to speed up the Angular build process


After making some changes in my TypeScript files, each build takes over 20 minutes. I run this command: ng build --output-path=..\..\static\angularjs.

If I run it in Microsoft PowerShell, it needs 25 - 30 seconds. This is a lot of time.

Enviroment

How can I speed this up?


Solution

  • My app took 28secs to build, but I've reduced the time to 9secs. Usings this flag

    ng build --source-map=false
    

    you can see the difference in time comparing the time:

    ng build --stats-json 
    
    ng build --stats-json --source-map=false
    

    source map is intended only for debugging, Hope it helps