Why is my react native apk size so big? And what can I do to reduce it?

Viewed 439

I created an app which I created using Expo, so I had all the files generated by them. But when I build the apk of my app which then I have to download from the expo server, it's size is more than 40 mb which is too high given that my app displays data using firebase and I have developed apps more complex than this which are around just 10mbs or so.

1 Answers

Why is my react native apk size so big?

The larger size of expo is due to Expo wrapper which sits on top of react native. It has few built-in modules which are not always required by the app but are included by default

What can I do to reduce it?

  1. You can eject from Expo to pure react native via expo eject OR
  2. For Expo SDK version 41+ managed workflow: They have introduced EAS (Expo Application Services) for managed workflow in sdk version 41 and it can reduce app size to even 10x smaller.

About EAS: https://blog.expo.io/eas-build-april-preview-update-ebd7dff9dd25

This is how you will build your expo app using EAS: https://docs.expo.io/build/setup/

Related