Ionic serve slow on compiling

Ionic take long time for compile all project


[ng] i 「wdm」: Compiling...
[WDS] App updated. Recompiling...
vendor.js:192189
[ng] i 「wdm」: wait until bundle finished: /
[ng] i 「wdm」: wait until bundle finished: /86.js
[ng] i 「wdm」: wait until bundle finished: /56.js
[ng] i 「wdm」: wait until bundle finished: /28.js
[ng] i 「wdm」: wait until bundle finished: /login-login-module.js.map
[ng] Date: 2019-05-22T07:54:13.720Z - Hash: e005a368ba911d7a6b69 - Time: 37671ms

All this has been happening for 2 weeks. There’s a solution?

Description:

I’ve updated my project and all dependencies from to the latest ionic version 4.12.0. Ionic serve is now very slow - it takes average 7.8 seconds to reload comparing to 0.9 seconds as it was with project created with 4.0 beta. Updating deps to the latest versions doesn’t help.

Steps to Reproduce:

Start new ionic project with ionic start , choose sidemenu template, change one symbol in home.page.html` template, wait for recompile.

Output:

[ng] ℹ 「wdm」: Compiling...
[ng] Date: 2019-05-05T10:14:46.241Z - Hash: 6d1092d844d763fdbe5f - Time: 4904ms
[ng] 181 unchanged chunks
[ng] chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 6.52 kB  [rendered]
[ng] ℹ 「wdm」: Compiled successfully.

My ionic info :-

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.3.1
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.3.8
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.5.1

System:

   NodeJS : v10.15.3 (/usr/local/bin/node)
   npm    : 6.9.0
   OS     : macOS Mojave

Other Information:
Ionic info for project with no performance issues: (please note the same node and ionic versions, it
seems that some of dependencies cause this issue)

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.7
   @angular-devkit/build-angular : 0.7.5
   @angular-devkit/schematics    : 0.7.5
   @angular/cli                  : 6.1.5
   @ionic/angular-toolkit        : not installed

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none
   Cordova Plugins       : no whitelisted plugins (0 plugins total)

System:

   Android SDK Tools : 26.1.1 (/Users/allforfree/Library/Android/sdk)
   ios-deploy        : 1.9.2
   NodeJS            : v10.15.3 (/usr/local/bin/node)
   npm               : 6.9.0
   OS                : macOS Mojave
   Xcode             : Xcode 9.4.1 Build version 9F2000
1 Like