3

I am new to Ionic, recently I developed One app.But my app size was 8mb. How should I reduce app size,and I am not using any Images and plugins also, but it took 8mb size. please help me.

2 Answers 2

6

For production builds you can use ionic cordova build [android/ios] --prod --release. This can reduced the size of your application.

The prod and release flags will minify code and remove debugging utilities.

Documentation: https://ionicframework.com/docs/intro/deploying/#production-builds

1
  • Thanks for your reply Commented Feb 13, 2018 at 5:04
2

You can use one of $ ionic cordova build options

  • --no-build - Do not invoke an Ionic build
  • --prod - Build the application for production
  • --aot - Perform ahead-of-time compilation for this build
  • --minifyjs - Minify JS for this build
  • --minifycss - Minify CSS for this build
  • --optimizejs - Perform JS optimizations for this build
  • ...

For example: ionic cordova build android --prod --aot

1
  • Thanks for your reply Commented Feb 13, 2018 at 5:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.