How to exclude unnecessary components included in Expo

Hi,
I have been pointed out that source code that I don’t use shouldn’t be included, so I want to exclude unnecessary components included in Expo without eject.
Specifically, the following two components. Is there a way to do that?

host.exp.Exponent.experience.TvActivity
com.facebook.CustomTabActivity

SDK Version: 38 or 39
Platforms: Android/iOS

thanks.

Hey @takeshi0405.expo.dev,

On iOS this is not currently possible. On Android, you can opt into using experimental lean builds by adding this to your app.json https://docs.expo.io/versions/v39.0.0/config/app/#enabledangerousexperimentalleanbuilds

Cheers,
Adam

1 Like

@adamjnav ,
thanks for your response.
I’ll try it right away.

thanks so much.

hi @adamjnav,

I’ve tried the opt you told me before, but it doesn’t seem to work.
When I look at AndroidManifest.xml after building, I see that some are reduced (by the way, CustomTabActivity and TvActivity remained). But when I install it on the emulator, it doesn’t even boot due to a system error.
I suspect that even the necessary modules have reduced.
Would you happen to know if there is a list of modules needed to make “enableDangerousExperimentalLeanBuilds” true?

thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.