Support for env.{enviroment-name} #442
quornik
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
Hey @quornik — great call! Although, as Payload "plugs in" to your own Node apps, this is actually something you'd need to do yourself completely outside of Payload. We actually don't load So, to do what you're looking for is pretty easy. Wherever you're using require('dotenv').config({ path: `.env.${process.env.NODE_ENV}` }) Boom! Done! Now, the Is that what you're looking for? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As in react / next.js it is a nice feature to support the env.envname convention. At this point, Payload does not support for ex. env.local and suggest to gitignore the env at all. Some of the vars we need are safe to be stored in repo, and that is how we are customed to use .env for.
Beta Was this translation helpful? Give feedback.
All reactions