Replies: 4 comments
-
Hello! Why would you ignore the Only See the related docs: https://nextjs.org/docs/basic-features/environment-variables#default-environment-variables |
Beta Was this translation helpful? Give feedback.
-
I see what you mean, but it is common for It may be better to instead have something like |
Beta Was this translation helpful? Give feedback.
-
To add to this, this Vercel's guide shows a good example of how ignoring The guide suggests pulling vars into that file |
Beta Was this translation helpful? Give feedback.
-
this is a no-brainer. if you want env vars to be public it should be set explicitly |
Beta Was this translation helpful? Give feedback.
-
Describe the feature you'd like to request
Why doesn't Next's .gitignore include
.env
? Seems strange to contain multiple advanced.env
s and exclude the most common and obvious one, which is the basic.env
Describe the solution you'd like
Add ".env" to Next's auto-generated .gitignore
Describe alternatives you've considered
I typically have a basic
.env
file in my directory, so I need to manually add a new line in .gitignore — in itself that's not a big deal, but seems dumb to have to do it when there are already multiple different .env files and yet none of these is the basic.env
Beta Was this translation helpful? Give feedback.
All reactions