My use case is that I have an env file and its contents are replaced each time I build the app through Appcenter with environment variables. I fear that when I update the file locally (for example add another variable), the file would be overwritten in next CodePush release (so basically the build from Appcenter after the vars are replaced will have different contents of this file in comparison with what CodePush will see). Is this the correct assumption? If it is, is there a way to exclude certain files from a CodePush update? Thanks.
Asked
Active
Viewed 878 times
1 Answers
1
I'm using react-native-config
, and it seems to bake the config values into the binary at compile-time, and they don't get overridden via the Code Push bundle.
If you're not using that, or just want to see what the Code Push bundle includes, use the CLI's code-push release-react
like you normally would. But once the bundle starts to upload, kill the process, preventing the upload. In your project folder, there will be a newly-created zip file containing the files that were going to be uploaded as part of the release. Unzip it and take a look to find out what's included, and trash it when you're done.

bmovement
- 827
- 7
- 11
-
I tried using react-native-config, but I had some problems with it and when looking at the issues in the repo (https://github.com/luggit/react-native-config/issues/269 and others), I decided not to use it. I was also thinking about storing the values in native code, but since it's RN, I try to limit 3rd party libs that have some native code in them as much as I can. Maybe I'll make some custom solution for this, but for now I'll try to look into the CodePush bundle - thanks for the advice! – filiphosko Sep 04 '18 at 10:51