The bundle includes `fabric` & `paper` React Native renderers
What happened?
see more context https://github.com/facebook/react-native/issues/34464
Affected Package
@rnx-kit/cli
Version
0.14.2
Which platforms are you seeing this issue on?
- [X] Android
- [X] iOS
- [ ] macOS
- [X] Windows
System Information
System:
OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Core(TM) i5-2400S CPU @ 2.50GHz
Memory: 2.41 GB / 13.64 GB
Shell: 5.1.16 - /bin/bash
Binaries:
Node: Not Found
Yarn: Not Found
npm: Not Found
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 11.0.16
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.0-rc.3 => 0.70.0-rc.3
npmGlobalPackages:
react-native: Not Found
Steps to Reproduce
-
cd packages/test-app -
yarn react-native rnx-bundle --dev true - Check the bundle and search for duplicate code
Like searching for:
ResponderEventPlugin.injection.injectGlobalResponderHandler`
- ReactNativeRenderer-prod.js#injectGlobalResponderHandler
- ReactFabric-prod.js#injectGlobalResponderHandler
You will see the two implementations in the bundle.
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Does this also happen when you run the rn-cli?
yarn react-native bundle --entry-file src/index.ts --platform android --bundle-output dist/main.android.bundle
grep injectGlobalResponderHandler dist/main.android.bundle
Or are you saying this is a feature request?
@tido64 I'm sorry for not being able to explain well. After some more research, I noticed that it's not a bug with the CLI, but that the React Native core includes the Renderer directly and not dynamically.
Below you can find some places: (in the React Native repo)
grep -nr "/Renderer/shims/ReactNative'" Libraries/

One little example of this:
In the ScrollView component
Does this also happen when you run the rn-cli?
yarn react-native bundle --entry-file src/index.ts --platform android --bundle-output dist/main.android.bundle grep injectGlobalResponderHandler dist/main.android.bundle Or are you saying this is a feature request?

That's right. You can enable/disable Fabric at runtime. I'm going to close this as it's not really an issue that our CLI should address.
This is now fixed. See https://github.com/facebook/react-native/issues/34464#issuecomment-1241208472