Ionic 2 Cordova - Speed up the boot and initial time for your app

Issue:
If you are facing the issue loading time of Ionic 2 app is too slow and too long, could be 20 second or higher, you should do following steps

Fix:
- Enable production mode for your app, in main.ts:
import {enableProdMode} from '@angular/core';

enableProdMode();
bootstrap(....);
- Remove development plugin while build, like console
cordova plugin rm cordova-plugin-console
- Build app with --prod
cordova build --prod --release android

Enjoy!

Comments

Post a Comment

Popular posts from this blog

Ionic 2 Angular 2 Cordova Fix: Application Error - The connection to the server was unsuccessful. (file:///android_asset/www/index.html)

Ionic 2: capture screenshot and social sharing