Describe the bug
babel-plugin-transform-inline-environment-variables doesn't use or update the value from process.env unless react-native start is called with --cache-clear
To Reproduce
react-native start --reset-cachebabelrc:
{
"presets": ["react-native-stage-0"],
"plugins": [
"transform-inline-environment-variables",
"syntax-trailing-function-commas"
]
}
@hzoo @boopathi Could the inline-environment-variables transform somehow clear the cache for affected files only?
As a workaround, you can use a .babelrc.js file:
module.exports = api => {
const presets = ['react-native-stage-0']
const plugins = [
'transform-inline-environment-variables',
'syntax-trailing-function-commas',
]
api.cache.invalidate(() => process.env.FOO)
return { presets, plugins }
}
Is there an update on this topic? I still get this error.. Also the suggestion from @aleclarson is not working for me :-/
@timosur Did you find a trick to clear some environment variables without the --reset-cache option ?
Most helpful comment
Is there an update on this topic? I still get this error.. Also the suggestion from @aleclarson is not working for me :-/