- 安装
npm intall webpack-bundle-analyzer --save-dev
config/webpack.config.dev.js 文件中,添加
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = { plugins: [ ... new BundleAnalyzerPlugin() ] }
运行
npm run dev
,打包分析页面:http://127.0.0.1:8888/
create-react-app 搭建的项目中,引入 webpack-bundle-analyzer 打包分析
猜你喜欢
转载自www.cnblogs.com/cag2050/p/9184352.html
今日推荐
周排行