1.安装

npm instatll webpack-bundle-analyzer --save-dev

2. vue.config.js配置

module.exports = {
  chainWebpack: config => {
      config
        .plugin('webpack-bundle-analyzer')
        .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
  }
}

3. 运行命令

npm run serve

4. 访问

http://localhost:8888
posted on 2021-01-11 14:00  佑之以航  阅读(514)  评论(0编辑  收藏  举报