-
Notifications
You must be signed in to change notification settings - Fork 32
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 ability to shut off dotenv invocation #84
Add ability to shut off dotenv invocation #84
Conversation
index.js
Outdated
@@ -24,6 +24,7 @@ module.exports = { | |||
clientAllowedKeys: [], | |||
fastbootAllowedKeys: [], | |||
failOnMissingKey: false, | |||
useDotenvFile: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are your thoughts on renaming this to enabled
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonmit That sounds fine to me. Will update and push up shortly.
This definitely needs to be merged. A missing Edit: actually, this change isn't good enough. You shouldn't have to configure whether it's enabled or not when you can interpret that condition from the presence or absence of the |
Part of v3.1.0, thanks |
@andrejcremoznik feel free to submit a PR. I'm fine with this PR going in as-is since it's simply adding behavior to toggle the addon on and off. |
@jasonmit thanks for the merge. Glad to help out! Psyched for the changes. |
So, this might be the wrong way to go about doing this, but I've run into two major issues in dealing with this dotenv wrapper for Ember:
When deploying to production in Heroku, the warnings can be confusing and alarming, when they really are meaning less because the environment variables are actually set within the Heroku environment; and
Sometimes the invocation of dotenv and the errors can cause build errors.
So, I've attempted to add the ability for users to bypass the use of dotenv in certain environments.
It seems there may be some consensus that dotenv should only be used for development (https://stackoverflow.com/questions/52546426/is-module-dotenv-for-development-only), but either way, giving control over the use to developers makes sense.
Happy to re-work, delete, or whatever seems appropriate.
Thanks!