Use dotenv instead of env vars in webpack config
See original GitHub issueUse dotenv and provide only a .env.example
file instead of setting everything on each webpack config file.
Something like https://github.com/lucasbento/react-relay-pokemon/blob/master/webpack.prod.config.js#L29 which is using dotenv-webpack.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
How to pass .env file variables to webpack config?
The webpack command line environment option --env allows you to pass in as many environment variables as you like. Environment variables will be ......
Read more >dotenv-webpack - npm
A secure webpack plugin that supports dotenv and other environment variables and only exposes what you choose and use.
Read more >A Dead Simple Guide to Using Environment Variables in Your ...
A Dead Simple Guide to Using Environment Variables in Your Front End with Webpack ... If you are using APIs in your React...
Read more >Using environment variables with Webpack - Prateek Surana
A guide for setting up and using environment variables with Webpack and handling different values for Production and Development ...
Read more >Environment Variables - webpack
The webpack command line environment option --env allows you to pass in as many environment variables as you like. Environment variables will be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a lot for your insights and involvement though @lucasbento! 😊
I totally see your point! That’s why we’ve created a dev stage for both
__GITHUB_OAUTH_CLIENT_ID__
and__LAMBDA_AUTH__
which is preconfigured for convenience when runningnpm start
.I guess it’s a good thing to keep the number of dependencies and additional tools to a minimum. If it add a lot of value in terms of DX I’d be happy though to merge it in.