-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
add dotenv support to PlatformConfigProvider #3743
Conversation
🦋 Changeset detectedLatest commit: cc368b4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The name might carry association to some behaviors dotenv has (like variable expansion), theres also dotenvx with its new mutli-env and encryption capabilities. I don't think this blocks the PR in any way, but we should think of the future plan with this. It might be better to just recommend people use |
this PR is somewhat a copy of dotenv and dotenv-expand codebases, so the variable expansion support is included
I haven't used dotenvx myself, if by multi-env you mean providing different
I think both an in-code API and CLI are valid options, the advantage of an in-code approach is that I can more easily do whatever I want in terms of configuring the application, and with the proposed change it would be a matter of combining layers / effects. At the end of the day it's a question of whether I want to put the responsibility into the typescript code or the shell code, and there is unlikely a definite answer to that, but I prefer the part of my codebase where a type-checker and linter look over my shoulder. |
I would just put require('@dotenvx/dotenvx').config() at the root of your program and call it a day. It works the same as prefixing the cli call with |
No description provided.