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