Only prod Instance build stays white after the splash screen

I have already outputted an apk from my project using,

ionic cordova build --release android

*This apk is working fine without giving any issues.
But when try to output a production build, while building it gives no errors, but when running it on myphone it stays white after the splach screen.
Command I tried is,

ionic cordova build --prod --release android

What could be the reason? I’m confused with the answers with the similar issues. Can anyone help me?

Plugins:
cordova-admob-sdk
cordova-plugin-admob-free
cordova-plugin-android-permissions
cordova-plugin-camera
cordova-plugin-device
cordova-plugin-document-viewer
cordova-plugin-file
cordova-plugin-file-opener2
cordova-plugin-file-transfer
cordova-plugin-ionic-keyboard
cordova-plugin-ionic-webview
cordova-plugin-nativestorage
cordova-plugin-network-information
cordova-plugin-splashscreen
cordova-plugin-statusbar
cordova-plugin-whitelist
cordova-promise-polyfill

Found the solution by running the app using USB Debugging.
Steps followed,

  1. On developer mode on and USB debugging on the device
  2. Connect your android device to the PC
  3. Run >> ionic cordova run android --prod
  • Running in production mode lets you create an application that meets production standard.
  1. Inspect the application using chrome
  1. Then solve every error shown in the console.

My issue was when I using a module to loadChildren I used it like,
{ path: ‘initial’, loadChildren: () => InitialPageModule }

But when trying production build being the code like below will help your apps to perform without errors.
{ path: ‘initial’, loadChildren: ‘./initial/initial.module#InitialPageModule’ }

Hope this help others in future.