import{_ as s,c as i,o as a,aj as n}from"./chunks/framework.DNhrqZu5.js";const o=JSON.parse('{"title":"配置打包分析","description":"","frontmatter":{},"headers":[],"relativePath":"guide/vue2/bundle.md","filePath":"guide/vue2/bundle.md","lastUpdated":1756280955000}'),l={name:"guide/vue2/bundle.md"},t=n(`

配置打包分析

javascript
const BundleAnalyzerPlugin =
  require("webpack-bundle-analyzer").BundleAnalyzerPlugin;

module.exports = {
  chainWebpack: (config) => {
    // 打包分析
    if (IS_PROD) {
      config.plugin("webpack-report").use(BundleAnalyzerPlugin, [
        {
          analyzerMode: "static",
        },
      ]);
    }
  },
};
bash
npm run build
`,3),p=[t];function h(e,k,d,E,r,g){return a(),i("div",null,p)}const y=s(l,[["render",h]]);export{o as __pageData,y as default};