react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.41k stars 905 forks source link

Managing Multiple React Native config file in #2481

Closed sandeep36butte closed 2 months ago

sandeep36butte commented 3 months ago

We have a common React Native module integrated with the multiple existing android Applications. Everytime when we want to build RN bundle to any specific android apps, needs an manual update for the react-native.conig file and change the sourceDir and package name within the project config.

Is there any better way to handle this rather than doing the manual update each time might be we can pass the custom reactnative conifg file path and the properties picked up from there.

szymonrybczak commented 3 months ago

I'm not sure I understand the issue, could you please elaborate and give more examples & structure of the project and library?

sandeep36butte commented 2 months ago

I have a couple of existing native apps, where i need to integrate the react native . Basically we are trying to build a brown field apps with react native.

I have a single RN repo which links to the android app src configured in the React native metro. This is My Folder Stricture

Every time Iam building the Android Apps, I need to manually change the Android Src folder in the Reactnative.config File. Iam just curise is there any way were i can configure the android and ios src folder from the cli or script before running the react native build.

szymonrybczak commented 2 months ago

We only support one Android app setups, so if you have multiple ones you need to develop a custom script that runs before running RNC CLI.