AngularWebpackVisualStudio icon indicating copy to clipboard operation
AngularWebpackVisualStudio copied to clipboard

Use optimization.splitChunks instead of separate entry points (Webpack 4)

Open stilettk opened this issue 5 years ago • 0 comments

Currently the vendors and polyfills bundles are created as separate entry points. However, in Webpack 4 this is not acceptable. From the documentation:

In webpack version < 4 it was common to add vendors as separate entrypoint to compile it as separate file (in combination with the CommonsChunkPlugin). This is discouraged in webpack 4. Instead the optimization.splitChunks option takes care of separating vendors and app modules and creating a separate file. Do not create an entry for vendors or other stuff which is not the starting point of execution.

stilettk avatar Feb 27 '19 21:02 stilettk