-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Bring your own process.env
#55
Comments
Yes, I see what you mean. I'll think on this.. maybe a tighter integration/hook with the In other news, |
I think there is a more fundamental problem with this option, and probably why it wasn't documented in the first place. It does too much. Not only does it not write to I think the original suggestion was a good one, but doesn't completely solve the underlying problem, which is that there should be a way to say to the module: "Read in values from Then, consider also adding an option to inject your own process.env, however, this should be achievable using |
@motdotla Any thoughts on the above? Would be great to get some direction on whether this should live in the |
you can now bring your own
https://github.com/motdotla/dotenv-expand?tab=readme-ov-file#processenv ( |
ignoreProcessEnv: true
is great, though undocumented 🙈, because we can prevent mutatingprocess.env
.Sadly this option has the effect that we cannot interpolate variables across different files. Something that is quite convenient in a dotenv setup like
.env.local
, …,.env
.Ideally this option would be
useProcessEnv: boolean | object
instead ofignoreProcessEnv: boolean
so we can loop over the seperate dotenv files without modifyingprocess.env
and without loosing the ability to refer variables across the files.The text was updated successfully, but these errors were encountered: