There are several ways to build with ionic 3, which are not really explained in detail in the docs: https://ionicframework.com/docs/intro/deploying/
The start time of my app varies drastically with the different builds:
ionic cordova run android --release
-> app start time 8 seconds
ionic cordova run android --prod
-> app start time 3 seconds
ionic cordova run android --prod --release
-> app start time 8 seconds
Would there be any reason for me not to build with just --prod? And if yes, what could I do to make --prod --release faster? (8 seconds is a not acceptable start up time for my pretty lightweight app) Is it true that I won't be able to deploy to Google Play Store without the --release option?
You need to differenciate between the two flags: --release is a flag used by the cordova CLI while --prod is a flag that is use by the ionic CLI. So what are those flags doing?
--prod is an alias for all of the following flags:
--optimizejs--minifycss--aot--minifyjsAnd is responsible for minifying and optimizing your .js bundle -> this is what makes your app startup faster because the browser needs to parse and interpret less code.
--release tells cordova it should build a optimized release .apk which you can sign and upload to Google-Play.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With