-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Support disabling NodeSourcePlugin for web target #4976
Comments
It's supported. See |
In that case, I think the plugin should honor the single kill switch. I could not get this https://github.com/webpack/webpack/blob/master/lib/node/NodeSourcePlugin.js#L40 to trigger even if I set This is looking at each lib https://github.com/webpack/webpack/blob/master/lib/node/NodeSourcePlugin.js#L74 |
would you like me to open a new issue for the plugin? I am happy to make the changes if we can come to an approach. |
@sokra would something like this work? updated: jchip@e8688a5 |
Do you want to request a feature or report a bug?
request a feature
What is the current behavior?
The default target
web
automatically apply the internalNodeSourcePlugin
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
If this is a feature request, what is motivation or use case for changing the behavior?
I just found out that due to some other module we use that has something like this:
This cause the internal
NodeSourcePlugin
to include a few very large files likeasn1.js
andbn.js
.To make things like this surface ASAP, I'd like to be able to disable the
NodeSourcePlugin
completely.First thing I tried was to set target as a function to do custom target, but the internal plugin
FunctionModulePlugin
is not exported. I could directly require that, but not ideal.It'd be nice if webpack can provide a new target that's basically
web
without theNodeSourcePlugin
.Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
The text was updated successfully, but these errors were encountered: