vue打包后详细查看各部分体积大小

1.npm install --save-dev webpack-bundle-analyzer

2.webpack.prod.conf.js配置

const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module:{
  plugins: [
    new BundleAnalyzerPlugin()
 ]
}

3.package.json添加

"scripts": {
    "analyz": "NODE_ENV=production npm_config_report=true npm run build"
  }
TIM截图20190320103237.png

你可能感兴趣的:(vue打包后详细查看各部分体积大小)