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