# 速度分析:使用speed-measure-webpack-plugin
使用:将默认配置文件包裹起来
const SpeedMeasurePlugin = require("speed-measure-webpack-plugin"); const smp = new SpeedMeasurePlugin(); //将默认的webpack配置文件包裹起来 const webpackConfig = smp.wrap({ plugins: [ new MyPlugin(), new MyOtherPlugin() ] });
# 速度分析插件作用
- 分析整个打包总耗时
- 每个插件和loader的耗时情况