We encountered an error while running an Ionic2 app using the --prod flag.
https://i.sstatic.net/LMLtS.png
After the splashscreen loads, the screen turns white.
The command we executed is:
ionic run android --prod
We are deploying on a Nexus 5x device (emulators also exhibit the same behavior).
Here is our ionic info:
apache cordova 6.4.0
Ionic Framework Version: 2.1.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.5.0
Xcode version: Not installed
Cordova plugins being used:
https://i.sstatic.net/FfVTA.png
Below are the dependencies listed in our package.json file:
"dependencies": {
"@angular/common": "2.1.1",
...
"zone.js": "0.6.26"
}
And here are our devDependencies:
"devDependencies": {
"@ionic/app-scripts": "^1.2.2",
...
"typescript": "^2.0.9"
}
Contents of tsconfig.json:
{
"compilerOptions": {
...
},
...
}
Despite updating the ionic-script to the latest version, the issue persists.
When using the stack and @ionic/app-scripts version 1.2.0, ngfactory files are generated but runtime errors occur:
https://i.sstatic.net/mOvvc.png
For more details, check out these links:
Forum Link
We are troubleshooting why the ngfactory files are not being included in the bundle with these versions.
Your assistance is greatly appreciated as we strive to optimize our app for production. Thank you for your invaluable support.
Best regards