Once installed the plugin works as expected (loading my .env vars in process.env being used in webpack and all), but after a node reload or any changes, it suddenly stops to populate process.env.
I can make it to "work" again either by changing in .babelrc the path option value (which I should not need, my .env is at the root of my repository) or by running a new yarn install --dev babel-plugin-inline-dotenv to clean it up, which makes me wondered if there's some sort of cache messing up here ?
Once it stops working for a specific .env path, it won't use it again no matter what until reinstalled.
node version : 9.11.1
package.json (relevant part)
"@babel/cli": "^7.0.0-beta.42",
"@babel/core": "^7.0.0-beta.42",
"@babel/node": "^7.0.0-beta.42",
"@babel/preset-env": "^7.0.0-beta.42",
"@babel/preset-react": "^7.0.0-beta.42",
"@babel/preset-stage-0": "^7.0.0-beta.42",
"@babel/register": "^7.0.0-beta.42",
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-plugin-inline-dotenv": "^1.1.2",
"babel-plugin-transform-require-ignore": "^0.1.1",
.babelrc
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-stage-0"
],
"plugins": [
["inline-dotenv"]
],
"env": {
"development": {
"plugins": [
"react-hot-loader/babel"
]
},
"node": {
"plugins": [
"dynamic-import-node",
[
"transform-require-ignore",
{
"extensions": [".sass", ".scss", ".less"]
}
]
]
}
}
}
Once installed the plugin works as expected (loading my
.envvars inprocess.envbeing used in webpack and all), but after a node reload or any changes, it suddenly stops to populateprocess.env.I can make it to "work" again either by changing in
.babelrcthepathoption value (which I should not need, my.envis at the root of my repository) or by running a newyarn install --dev babel-plugin-inline-dotenvto clean it up, which makes me wondered if there's some sort of cache messing up here ?Once it stops working for a specific
.envpath, it won't use it again no matter what until reinstalled.node version : 9.11.1
package.json(relevant part).babelrc{ "presets": [ "@babel/preset-env", "@babel/preset-react", "@babel/preset-stage-0" ], "plugins": [ ["inline-dotenv"] ], "env": { "development": { "plugins": [ "react-hot-loader/babel" ] }, "node": { "plugins": [ "dynamic-import-node", [ "transform-require-ignore", { "extensions": [".sass", ".scss", ".less"] } ] ] } } }