-
Notifications
You must be signed in to change notification settings - Fork 74
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
Use dotenv-safe #4
Comments
Thanks for the recommendation! I saw someone else had created something similar to it, but for our workflow we don't really use it. If you want, you can use I don't think our packages are much different apart from that. |
@mrsteele yeah, tried that one and did not work. Anyway, thank you for yours! |
Didn't work really? Did mine work? 😆 |
I ask because if his is having problems, maybe I can look into incorporating dotenv-safe as an optional alternative: const Dotenv = require('dotenv-webpack');
module.exports = {
...
plugins: [
new Dotenv({
safe: true
})
]
...
}; |
@mrsteele I would not star it if it did not work haha 😆 All the other options that I tried failed with something similar to this issue: request/request#1529 That way you mentioned would be great. |
If you wanna guiny-pig this, I just did a feature branch to support this. Options:
The branch is |
@mrsteele awesome! If I stall from your branch it throws this error: Do you know why? It installs normally if I use the published package on npm. |
You probably need to
|
Might have to |
@mrsteele I will try it as soon as I get home. |
npm i git+https://github.com/mrsteele/dotenv-webpack.git#feature/dotenv-safe -D
cd node_modules/dotenv-webpack
npm i && npm run build Throws an error because |
Well if you clone you would still need to build if your environment doesn't support Babel things.
That way you have all the dependencies, as well as access to the dist version of the plugin. Matt Steele
|
Okay I finally have time to tackle this a bit. Just realized something a little problematic with this. You have access to the dotenv but not the actual env variables of the machine. Going to look into refactoring all of this in a little bit and i'll touch base when that is all done. |
Ok, cool. |
I got it all checked in and it is releasing as Please check this specific version out and if you have any problems, please open a bug ticket. Have a look at the new README.md file which displays the supported additional params to satisfy this need. Thanks for the suggestion and all the help along the way! |
Use dotenv-safe instead of dotenv.
The text was updated successfully, but these errors were encountered: