Why ".env.prod" instead of ".prod.env"

Viewed 38

Noticed that when it comes to multiple dotenv files, important figures seem to have settled on the convention ".env.prod" and ".env.development" instead of ".prod.env" and ".development.env", respectively.

This can be seen in documentation from Firebase, Create-React-App and others.

To me it seems like the reverse, e.g. ".prod.env" would make more sense, since that would still make the file extension an "env file" -- you are looking for .env files and there are multiple options. Whereas with the convention presented, you are now looking for files that technically have all different kind of extensions.

However, it's safe to presume that the folks over at Firebase and CRA have thought about this much more than me. I was wondering if anyone had insight into why this decision was made, and what relative merits it has over the alternative. It might totally just be "that's just how it happened" and I'm okay with that answer, but I'd like to know if otherwise!

0 Answers
Related