Ionic Plugins are not being installed when built by --prod flag

I removed those two plugins which are SQLite and File from app.component.ts and my issue is resolved now. Now, i ll be searching the way to handle sync in the start of the application but i have learned one thing and that is i should not have done that in app.componen.ts . Thank you all for your efforts.

Actually, the only “strange” thing I see there is the timeout. You shouldn’t need that and this might cause the problems.

Instead doing my Sync operation in app.component.ts , i have created page which is represented as rootPage in app.component.ts , and did the Sync operation and no problem. Application ran in 2 seconds with ionic cordova run android --prod. But i ll try out suggestion as soon as possible and return a feedback to you . Thanks again

1 Like

In addition to the setTimeout() comment above, I would strongly recommend never stashing loading indicators as object properties. If they are always lexically scoped, you are at a much lower risk for accidental reuse or double-dispose bugs.

1 Like