webpack-bundle-analyzer

使用

  1. const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
  2. plugins: [
  3. new BundleAnalyzerPlugin()
  4. ]

时间分析speed-measure-webpack-plugin

  1. const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
  2. const smp = new SpeedMeasurePlugin();
  3. const webpackConfig = smp.wrap({
  4. entry:...,
  5. ....,
  6. plugins: [new MyPlugin(), new MyOtherPlugin()],
  7. });