Skip to content

[V5] Bundle size regression: Repack v5 + Rspack + MF2 produces 3-5x larger bundles #1181

Closed
@longb1997

Description

@longb1997

Describe the bug

After upgrading from Repack v3 to Repack v5, we're experiencing a significant bundle size regression where the new setup produces bundles that are 3-5 times larger than the previous version.

Image

System Info

OS: macOS 15.2
  CPU: (10) arm64 Apple M4
  Memory: 685.73 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.18.3
    path: ~/.nvm/versions/node/v20.18.3/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.18.3/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.18.3/bin/npm
  Watchman:
    version: 2025.02.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/mobile/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.22562.218.2431.13114758
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.26
    path: /usr/bin/javac
  Ruby:
    version: 3.1.2
    path: /Users/mobile/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: 15.1.3
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.9
    wanted: 0.76.9
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Re.Pack Version

5.1.2

Reproduction

https://github.com/longb1997/bundle-size-issue

Steps to reproduce

Follow README of the repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:newNew issue, not reviewed by the team yet.type:bugA bug report.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions