Huge bundle size for the Expo's web export after v46

77 Views Asked by At

Once we upgraded our project to Expo version 48, we switched the web build command from npx expo export:web to npx expo export -p web.

After that we notice there is an increase in the build output. I know that there are already some methods to reduce the bundle size but my question is a little bit different.

I am trying to understand:

  1. is our observation a normal situation? (I am not able to retest, because I am not able to revert back our code base to the previous version easily so that an exact apple-to-apple comparison can be done.)
  2. Are there any usual suspects that we can get rid of (maybe like code maps, according to the documentation code maps seem not included by default but the ChatGPT hallucinated as if it is).
  3. Is it possible to break the main very big bundle js file, so that maybe non changed parts can be re-used from the clients' caches?
  4. I see in the changelog an item like;

Reduce Metro bundles during expo export for Metro static web. #23987

but I am not sure if this is automatically applied when I run th npx expo export -p web command. My npm global node_modules directory looks like:

npm
corepack
yarn
create-expo-app
detox-cli
eas-cli
sharp-cli

I see there is an existing question but it had no answers.

0

There are 0 best solutions below