When running an ionic build
I'm curious as to the difference between the --prod
and --release
flags?
The Ionic build docs state:
--prod Build the application for production
--release Create a Cordova release build
and while the Cordova CLI ref doesn't mention a --prod
flag, it states the following for --release
:
Perform a release build. This typically translates to release mode for the underlying platform being built.
Looking at the difference in the build output, building with --prod
seems to run an Ionic 'production' build, in that it also runs the ngc
and uglify
(which itself runs cleancss
) tasks.
And when I run a build with --release
, I seem to get a Cordova release build, which (per the docs) attempts to run a release build on whatever platform you're targeting.
Are those the only differences, or am I over-simplifying?
For reference, note the following output APK filesizes:
- Prod flag: 9.8 MB
- Release flag: 11.7 MB
- Prod + Release flags: 8.9 MB
I'm using the latest (ATTOW) version of the Ionic Framework (3.9.2) and CLI (3.20.0).