一. 安裝webpack-bundle-analyzer
yarn add webpack-bundle-analyzer
二 vue.config.js檔案新增如下配置
module.exports = {
chainWebpack: config => {
config
.plugin('webpack-bundle-analyzer')
.use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
},
}