This is my humble attempt to understand and help you with SplitChunksPlugin chunks option by taking a common example.

As an early enthusiast I tried to understand the sorcery behind Code-Splitting. The docs says that splitChunks.chunks accepts ‘initial’, ‘async’ and ‘all’. I was kinda confused, and it raised my curiosity even more!

I dug deeper into the documentation Github history and WebpackOptions Schema and found out that,