Skip to content
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

Update dotenv example in env.md #2538

Merged
merged 1 commit into from Apr 19, 2020
Merged

Update dotenv example in env.md #2538

merged 1 commit into from Apr 19, 2020

Conversation

rossta
Copy link
Member

@rossta rossta commented Apr 19, 2020

Removes use of EnvironmentPlugin from the dotenv example in the docs.

The base webpack config already adds the EnvironmentPlugin with JSON-ified process.env:

result.append(
'Environment',
new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(process.env)))
)

Removes use of `EnvironmentPlugin` from the dotenv example in the docs.

The base webpack config already adds the `EnvironmentPlugin` with JSON-ified `process.env`: https://github.com/rails/webpacker/blob/a84a4bb6b385ae17dd775a6034a0b159b88c6ea9/package/environments/base.js#L31-L34
@gauravtiwari gauravtiwari merged commit 019adcc into rails:master Apr 19, 2020
@np6176a
Copy link

np6176a commented Mar 22, 2021

I'm not sure why this was merged. This feature doesn't work with this line removed.

@rromanchuk
Copy link

@np6176a are you on 6 or 5? i can't access process.env except for in config. No idea what i'm doing lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants