javascript - Is webpack dllPlugin only for development environment?
ringa_lee
ringa_lee 2017-07-05 10:50:06
0
1
1022

What is the difference between dllPlugin and commonChunkPlugin? Aren’t they all packaged with public dependencies?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
滿天的星座

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template