-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotenv-expand support? #97
Comments
Currently |
@bhishp I had the same problem and I solved it by using dotenv-cli, which supports dotenv-expand. You can use it as follows in you package.json: "start": "dotenv -e .env.staging npm run develop", |
This is different from the existing It would be great to have Right now I am using an |
I had a play - for simple expansions only, this should work: |
you can use HELLO="World"
HELLO2=$HELLO // index.js
console.log(`Hello ${process.env.HELLO}`)
console.log(`Hello ${process.env.HELLO2}`) dotenvx run -- node index.js |
Is dotenv-expand supported? (https://github.com/motdotla/dotenv-expand)
I think not because I have attempted to add this to the env files but it doesn't work.
REACT_APP_APP_VERSION=${npm_package_version}
(as per CRA docs:)
https://create-react-app.dev/docs/adding-custom-environment-variables/#expanding-environment-variables-in-env
Happy to raise a PR to add support if someone could point me in the right direction...
The text was updated successfully, but these errors were encountered: