flexn-io/renative

Can we override a file based on environment

youssefali424 opened this issue · 1 comments

Like having two files ex: config.dev.xml and config.prod.xml
config.dev.xml is used with dev env and replace the current etc same with prod file
is there a way to do so ?

Pretty sure that is not supported in a way you describe, however there is a very similar feature, which could answer your needs - appConfigs - https://renative.org/docs/overview/introduction#appconfigs. They should allow you to set up multiple flavours of the app and the only thing needed to change when you run will be the addition of -c to run command or any other command you want to call (example npx rnv run -p platform -c appConfig). As you can see in docs it allows configuration of platforms, plugin overrides, asset file injections and more, so hopefully this resolves what you need