Automatic common chunk extraction – SplitChunksPlugin

SplitChunksPlugin does the job of automatically factoring out common chunks from various bundles. It is able to automatically extract all external libraries in separate bundles, but it is not convenient to have the overhead of bundling all library files at each build during development. Therefore, it is recommended to leave the job of bundling all external libraries to the DllPlugin that prepares all libraries bundle in separate build processes that may be performed just once per project. 

There is no need to add SplitChunksPlugin to the plugins property in the configuration file, since WebPack invokes it automatically if the following configuration snippet is added to the WebPack configuration ...

Get Hands-On TypeScript for C# and .NET Core Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.