1️⃣ 包分析器 bundle analyzer

使用插件来分析包的大小根据分析来优化包

1️⃣ 安装

  1. const WebpackBundleAnalyzer = require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
  2. module.exports = {
  3. mode: "production",
  4. plugins: [new WebpackBundleAnalyzer()]
  5. };