React Native Metro transformer that loads your app-config values into bundles statically.
yarn add @app-config/mainOr, if you use NPM.
npm i @app-config/mainyarn add -D @app-config/react-nativeOr, if you use NPM.
npm i -D @app-config/react-nativeMerge the contents of your project's metro.config.js file with this config (or create the file if it does not exist already).
metro.config.js:
module.exports = {
// Force cache reset in order to load app-config changes
resetCache: true,
transformer: {
babelTransformerPath: require.resolve('@app-config/react-native'),
},
};As it is today, you will need to restart your React Native dev server every time you update app-config in order for the changes to take effect.
We are working to see if hot reloading is possible. PR's welcome!