Open sourabhv opened 6 years ago
@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 ?
Describe the bug
babel-plugin-transform-inline-environment-variables
doesn't use or update the value from process.env unlessreact-native start
is called with--cache-clear
To Reproduce
react-native start --reset-cache
babelrc: