Closed nathan-ahn closed 2 days ago
btw I've tested with v0.1.4
and excludedPackages
does work as expected.
I archived a build without any packages in that list -- got about 55MB
Then added a bunch of packages in our project to excludedPackages
, archived again -- got about 26MB
So the issue may have been introduced after v0.1.4
Going to experiment, but I think there's a good chance this issue is related to this commit.
This issue only affects non-Expo modules. Expo modules are correctly handled with use_expo_modules
's exclude
field, but non-Expo modules are going to require a custom implementation.
Fixed in #50.
Findings
I ran two tests to determine that
excludedPackages
isn't working. Both using react-native-skia which is known to have a significant iOS bundle size of ~5.8 MB. Resulting bundle sizes are determined usingApp Thinning Size Report.txt
as recommend by Apple.Test 1
Including "@shopify/react-native-skia" in
excludedPackages
yields an uncompressed size of 27.7 MB. Removing it yields the same uncompressed size of 27.7 MBTest 2
As in the previous test, including
"@shopify/react-native-skia"
inexcludedPackages
yields an uncompressed size of 27.7 MB. I uninstall@shopify/react-native-skia
completely and got an uncompressed bundle size of 21.8 MB. According to Shopify, the JavaScript bundle is only supposed to account for 220 KB (and likely 0 KB in our case given that it was never imported). So the size discrepancy is almost definitely due to properly removed native code.Additional Note
ios/Pods/Podfile
generates correctly with"@shopify/react-native-skia"
being included inexclude
.