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

incompatibility ES6 + #153

Closed
navarrojava opened this issue Nov 19, 2018 · 1 comment
Closed

incompatibility ES6 + #153

navarrojava opened this issue Nov 19, 2018 · 1 comment

Comments

@navarrojava
Copy link

When I use es6 feature "destructing assignment", the variables do not work.

// It does not work
const { MY_VARIABLE } = process.env;

// It work
const MY_VARIABLE = process.env.MY_VARIABLE;

I think a little tuning in the engine that extracts the variables can fix it.

@mrsteele
Copy link
Owner

I would suggest you refer to this comment: #70 (comment)

We have done extensive research and it actually is fully supportive with es6, however the way that webpack.DefinePlugin works.

We can either leak all process.env variables every time you reference a single variable, or we can remove the ability to destruct your env variables. For the purposes of security we opted to use the former.

I am closing this as it is a duplicate of #70. Let me know if there is anything else.

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

No branches or pull requests

2 participants