-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
splitChunks.cacheGroups.defaultVendors
not extending default behavior
#5174
Comments
For maintainers only:
|
Yes, using |
I see. But why should it not be extending default behavior? It's not so straightforward from my point of view. You always need to search for the complete default config when you only need to overwrite one attribute in it. |
Because it was implemented, if we extend other developers ask why we extend, and we decided do not extend, like it happens in JS, when you change property of object, in webpack we have |
Thanks for your explanation! Keeping an eye on the PR now. |
Let's keep open here, we need improve our docs |
Bug report
I was trying to split my app code and all
node_modules
packages into two separate bundles and I wanted to name the dependencies bundlevendors.js
.Here's my configuration:
What is the current behavior?
The output app bundle contains only runtime scaffold and vendors bundle contains both dependencies and all my app
code.
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
The app bundle should contain my app code and the vendors bundle contains
node_modules
dependencies.FYI, adding
test: /[\\/]node_modules[\\/]/
rule todefaultVendors
config solves this problem. So I believe providingdefaultVendors
option replaced the default behavior instead of extending it.Other relevant information:
webpack version: 5.43.0
Node.js version: 14.15.5
Operating System: macOS 11.4
Additional tools:
The text was updated successfully, but these errors were encountered: