facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.24k stars 626 forks source link

Bundle Size increased Significantly #983

Open mohitarora777 opened 1 year ago

mohitarora777 commented 1 year ago

New Version

0.71.7

Old Version

0.66.3

Build Target(s)

Android

Output of react-native info

System: OS: macOS 13.3.1 CPU: (10) arm64 Apple M1 Pro Memory: 2.28 GB / 32.00 GB Shell: 3.2.57 - /bin/sh Binaries: Node: 20.1.0 - /opt/homebrew/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 9.6.4 - /opt/homebrew/bin/npm Watchman: 2023.05.08.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.17 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.7 => 0.71.7 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

Upgrade to 0.71 and create a release app bundle, now run apk analyser. Old=> image

New=> image (1)

Only 3 dependencies changed in package.json. Rest were changed in devDependencies.

Screenshot 2023-05-12 at 4 56 26 PM
mohitarora777 commented 1 year ago

The size decreases to 710KB when i turn off hermes.

cortinico commented 1 year ago

Passing this over to the Metro team

mohitarora777 commented 1 year ago

@cortinico Is Metro team going to see this issue if this is happening because of hermes ? Even the codepush bundle size is 710KB

mohitarora777 commented 1 year ago

@robhogan can u help here ?

saif-o99 commented 1 year ago

no updates?

mohitarora777 commented 1 year ago

@saif-o99 u r facing too ??

saif-o99 commented 1 year ago

Yes, my app release apk increased ~10MB after updating RN to latest