-
Notifications
You must be signed in to change notification settings - Fork 929
Description
Describe the Feature
At Shopify, we are using the React Native CLI in a monorepo setup:
react-native-packages/
node_modules/
fixture/
node_modules/
metro.config.js
android/
...
packages/
...
Since the CLI launches the packager taking the directory where React Native lives as the working directory, it causes the packager command to try reading the Metro configuration from the wrong directory - react-native-packages/node_modules/react-native
.
I suppose that it could be solved by adding an option to provide a path to the custom metro.config.js
when running run-ios
and run-android
commands.
Possible Implementations
I spent some time understanding the code base and find some possible implementations, but I struggle to find a place where Metro CLI actually gets called.
How I understand the process so far: runAndroid command runs launchPackager.command
to start metro server. launchPackager.command
calls react-native-community/cli run, and from here I can't connect the dots how we run Metro CLI and start the server.
I'd be happy to submit a pr for this feature request if somebody could point me out the right place for introducing these changes 😄🤞