Move vendors cacheGroup to a mode more specific than ‘none’

Do you want to request a feature or report a bug?

Requesting a feature, well, more of a change to existing feature.

What is the current behavior?

With webpack 4.6.0, with mode: ‘none’, webpack is still building vendors~ chunks because of the default settings for optimization.splitChunks.cacheGroups. We have to explicitly pass vendors: false to disable this behaviour.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

I would expect mode: ‘none’ to not have any explicit cacheGroups settings so that webpack would generate only the chunks implied by dynamic imports in my code.

If this is a feature request, what is motivation or use case for changing the behavior?

mode: ‘none’ is supposed to let users opt out of zero-config and take control of their bundling. split-chunks-plugin should respect this.

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

node 8.11.1
webpack 4.6.0

Author: Fantashit

1 thought on “Move vendors cacheGroup to a mode more specific than ‘none’

  1. It is breaking changes, we can’t do this in webpack@4

    True, and I’m not asking for it in webpack 4, but I think it’s the right thing to do at some point.

    also mode for enable optimization, splitChunks.cacheGroups is code splitting, not optimization

    idk, it’s optimization.splitChunks, makes me think splitting is part of optimization

Comments are closed.