Skip to content
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

Suggestion: Add ability to merge .env file values with process.env values #24

Open
RomaRudyak opened this issue Dec 27, 2022 · 1 comment

Comments

@RomaRudyak
Copy link

Hi runtime-env-cra team,
Thank you for the tool it helps with a build-once-deploy-everywhere approach.

I would like to suggest merging .env file values with process.env.
The flow:

  1. load the .env file
  2. the override values from process.env

This will help to have default configs and dynamically override only few of them.

Thanks

@kHRISl33t
Copy link
Owner

Hey!

Let's say I have a .env.example like this:

FOO=BAR
API_URL=https://something.api.com/

And where the application runs, only API_URL is set in the environment variables, and FOO should be set dynamically from the .env.example because it's not set as an environment variable.

I can see this working with a CLI flag. Something like --dynamic-merge? What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants