SplitChunk plugin keeps large dependencies in two seperate chunks.

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


What is the current behavior?

A few large dependencies (slate / react-slate / immutable) shared by two pages are not put in a shared chunk (a large number of dependencies are the same including components). See visualization below:


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

splitChunks: {
  chunks: 'all',
  name: false,

What is the expected behavior?

In my understanding this should not happen by default, so I’d like to see if this is incorrect behaviour. If this is the case I’ll happily provide more information to investigate.

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

webpack version: 4.5.0.

Author: Fantashit

1 thought on “SplitChunk plugin keeps large dependencies in two seperate chunks.

  1. Fixed it by increasing the optimization parameters:

    { maxInitialRequests: 5, maxAsyncRequests: 7, }

    Now it beautifully packs them together.

Comments are closed.