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
Making injecting node builtins optional #588
Comments
Ah, I should explain my situation a bit more. My code uses checks like |
What does the envify-loader do? |
It loads envify, which preprocesses your code to replace instances of Looks like I can work around this in my code by using Still, I feel like this behavior breaks expectations. If dead-code elimination results in unused modules, those modules should no longer get injected. |
Take a look at https://www.npmjs.org/package/react for an example of third-party code using
|
Yes, the I'm pretty sure that modules which are required in a dead-code block are not included into the bundle. But maybe this only happens when minification is active @sokra? |
You can disable it with tne
So it is.
That should not be the case.
This should be the case too. |
You guys are right, I tried using
Ah, good to know, thanks! |
Also, just learned to use transform-loader instead of envify-loader: mjohnston/envify-loader#1 |
Could injecting dummy objects from https://github.com/webpack/node-libs-browser become optional? I think this is both on-demand (only objects that get used get injected) and optional in
browserify
(https://github.com/substack/node-browserify/blob/master/lib/builtins.js).The text was updated successfully, but these errors were encountered: