I have a counter proposal. Let's see if you like it. What if I told you I made a configuration package that is not a hack (like dotenv here) and works natively with React or NodeJS?
I am talking about wj-config, a configuration package able to create a hierarchical configuration object. It is inspired by the amazing .Net Configuration, so you can have multiple configuration sources and perform per-environment overrides.
On top of that, you can trace configuration values and have automatically created URL functions that does all URL management for you.