'How to run expo start with release-channels
I want to try running my react native app locally but against my staging and/or production server. I'm looking to do this by setting a release-channel variable when I run expo start. I hope this can test/foreshadow some performance in beta and production.
I tried the command expo start --release-channel staging and I got an error error: unknown option '--release-channel'
How can I set Constants.manifest.releaseChannel when I run expo start?
Solution 1:[1]
To those who also try to use environment within expo but for the web target,
My solution is to use cp to overwrite the prod configuration in prebuild script:
# fix --release-channel not available for web yet
cp -f src/config/env/staging.js src/config/env/prod.js
I also got tips from expo tips that the
--release-channelfeature is not available for web, this is the only way I have found so far.
Solution 2:[2]
react-native run-android --variant=release & react-native run-ios --configuration Release maybe would help :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dimitri Kopriwa |
| Solution 2 | Daniel Danielecki |
