question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use dotenv instead of env vars in webpack config

See original GitHub issue

Use 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:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
schicklingcommented, Oct 23, 2016

Thanks a lot for your insights and involvement though @lucasbento! 😊

1reaction
schicklingcommented, Oct 23, 2016

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 running npm 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found