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

feat: better .env loading support #1523

Open
typedarray opened this issue Feb 14, 2025 · 0 comments
Open

feat: better .env loading support #1523

typedarray opened this issue Feb 14, 2025 · 0 comments

Comments

@typedarray
Copy link
Collaborator

Problem / use case

We currently only auto-load .env.local, but sometimes people like to use .env or .env.dev

Proposed solution

I like the approach Next.js uses (docs)

Environment variables are looked up in the following places, in order, stopping once the variable is found.

process.env
.env.$(NODE_ENV).local
.env.local (Not checked when NODE_ENV is test.)
.env.$(NODE_ENV)
.env

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

1 participant