Review
- 2024-09-15 07:25
[!Summary]
一、Introduction #
优化构建效率
- 持久化缓存:内置cache
- 并行构建:
thread-loader
优化Bundle
- 压缩:
html-webpack-plugin,optimise-css-assets-webpack-plugin,cssnano,terser,image-webpack-loader - 分包:Entry chunk / Async Chunk / Runtime chunk /
splitChunks - Tree-Shaking:
useExports,sideEffect
CSS Tree Shaking
purgecss-webpack-plugin
JS Tree Shaking
optimization: { useExports: true }