-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
with-dotenv example when changing .env changes doesn't get applied #4748
Comments
Try |
is pm2 restarting the process entirely when you make changes to your .env file? dotenv will not overwrite existing values in |
@timneutkens you are close enough if i delete my node_modules and re install them then building the app once again and run it through pm2 it reloads the .env variables |
That's why I added the labels instead of closing immediately 😄 |
Related Issue: brysgo/babel-plugin-inline-dotenv#13 |
## Issue I decided to rewrite the [with-dotenv](https://github.com/zeit/next.js/tree/canary/examples/with-dotenv) using [dotenv-webpack](https://github.com/mrsteele/dotenv-webpack) example because: - changes doesn't get applied (#4748, brysgo/babel-plugin-inline-dotenv#13) - the production mode doesn't work at all - this approach has already been used in the [examples/relay-modern](https://github.com/zeit/next.js/blob/9320d9f006164f2e997982ce76e80122049ccb3c/examples/with-relay-modern/next.config.js) - it is [documented](https://webpack.js.org/plugins/environment-plugin/#dotenvplugin) by webpack ## Alternatives * remove/deprecate example * fix babel-plugin-inline-dotenv ## Related Closes: #4748
Example name
with-dotenv
Describe the bug
i have followed this with-dotenv example and it works as expected fist time then i did a change on the .env file but it seems the first values of .env is still loaded
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
to see the new values of variable which is x2@gmail.com
The text was updated successfully, but these errors were encountered: