Matt Steele
Matt Steele
Delete the `safe: true` line and you both should be fine.
@evisong Very interesting find. A brief history of this plugin: We actually used to do what you have recommended (see PR #42), but by defining a single property as `process.env`...
I can confirm your suggestion would leak the data, however you are completely right in saying that the current approach does not support destructors due to the bundling methods. I...
@evisong thanks and I appreciate the feedback. I think it may be worth mentioning to webpack. We have definitely done the research beforehand and we can use the previous ticket...
Workarounds are great, but I think the original issue still stands: > As a user, I need to be able to destruct any and all properties from an object.
@33Fraise33 I understand the frustration, unfortunately this is a complication in the way `webpack.DefinePlugin` works, you will see the test-cases I wrote above and pros and cons with switching some...
Hey everyone, I wanted to ask if this was still a problem. I just did a test on my https://github.com/mrsteele/dotenv-webpack-example/commit/947cb5cfda7a30bbfaab3cb1deac73a0d2730817 app to see if this was still a problem and...
It worked for me. It loaded just fine all the variables I referenced and didn't leak anything out so I imagine there is some magic transpiling/tree-shaking going on that resolved...
I have noticed this works intermittently in webpack 5. I think some of the gatchas mentioned above are the reasonings. I do know with webpack 5 we have to be...
@colton-savage-lmp I don't know why I didn't consider this initially. Thanks for sharing!