Package speed optimization

Modules are compiled on demand

Reference links: zhuanlan.zhihu.com/p/137120584

Caching compilation results

Not so much pre-packed

The DllPlugin and DllReferencePlugin have somehow managed to break down bundles while dramatically increasing the speed of builds.

Multithreaded packaging

Package volume optimization

The separation

Separate the code into different bundles, and you can load these files on demand or in parallel. Code separation can be used to get smaller Hundles and control resource loading priorities, which, when used properly, can greatly affect load times. There are three common ways to separate code:

  • Entry starting point: Configure manual separation code using Entry
  • To prevent duplication: Use SplitChunksPlugin to unduplicate and classify chunks
  • Dynamic import: Separation of code through inline function calls to modules

tree shaking

other