babel-plugin-module-resolver
babel-plugin-module-resolver copied to clipboard
.babelrc BABEL_ENV support not working
Hello,
Any idea why this is not picking BABEL_ENV ?
.babelrc
{
"presets": [
[
"react-native"
]
],
"plugins": [
[
"module-resolver",
{
"alias": {
"@state": "./node_modules/state/src",
"react-native": "./node_modules/react-native"
},
"extensions": [
".js",
".json",
".ios.js",
".android.js"
]
}
]
],
"env": {
"development": {
"plugins": [
[
"module-resolver",
{
"alias": {
"@state": "../state/src",
"react-native": "./node_modules/react-native"
},
"extensions": [
".js",
".json",
".ios.js",
".android.js"
]
}
]
]
},
"production": {
"plugins": [
[
"module-resolver",
{
"alias": {
"@state": "./node_modules/state/src",
"react-native": "./node_modules/react-native"
},
"extensions": [
".js",
".json",
".ios.js",
".android.js"
]
}
]
]
}
}
}
BABEL_ENV=development react-native start
BABEL_ENV=production react-native start
What about package.json ? Would be nice to be able to use it too.
Thanks for help!