My app does work when I build it with
ionic build android --release
but ‘hangs’ on the device when using
ionic build android --release --production.
My scripts config in package.json reads
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
Is this sufficient?
Any ideas (or useful links that address this issue) appreciated…
… nobody else has/had this problem?
I do have the problem. I can build with “–prod” if I downgrade the ionic-app-scripts to 0.0.46. When using anything above 1.0.0 I have the same problem. Works fine if I do a normal build (but the app is a bit slow with huge start up time), and it just hangs when doing production build. Please write if You managed to do a “–prod” build with the latest scripts.
I had the same problem, until I generated a new app with (Ionic 2 final 2.0.0) and copied all my code in src directory.
Now I can build --prod with no problem anymore, and my app is fast…
App scripts version: 1.1.3
Thanks Emmanuel, I did create a new project with the latest build - and was able to compile with --prod this time. Not much improvement in loading speed in my case though …
Quick question, do you know what the difference between the --prod and --release options in a build? I can’t seem to find any documentation on the --prod option.
From another posting I have read that --prod option prepares the code for production in ‘Ionic’ level, while the --release prepares code/apk for production on Cordova level. Hence when you do your final release you execute ionic build --prod --release
Thanks, I feel like this information is missing from the ionic documents. Maybe we should add it.