What is the difference between dllPlugin and commonChunkPlugin? Aren’t they all packaged with public dependencies?
滿天的星座2017-07-05 10:52:06
First of all, DllPlugin and DllReferencePlugin can be used to pre-build vendor packages. In this way, as long as there are no additional dependency changes after a pre-build, the speed of starting the development environment will be significantly improved.
So in fact DllPlugin can be considered to be only used in the development environment. As for CommonsChunkPlugin, it is used to extract common dependencies in multiple packages into the same Chunk, which can significantly reduce the size of the production environment.
Regarding the difference between the two, it can be considered that DllPlugin is used to speed up the construction speed of the development environment, while CommonsChunkPlugin is used to optimize package size.