Registry / devops / speed-measure-webpack-v5-plugin

speed-measure-webpack-v5-plugin

JSON →
library1.5.2jsnpmunverified

A Webpack plugin that measures the execution time of loaders and plugins during builds, helping developers identify performance bottlenecks. Current stable version is 1.5.2, compatible with Webpack versions 1 through 5. This is a community fork of stephencookdev/speed-measure-webpack-plugin, specifically updated for Webpack v5. The primary differentiator is its ability to exclude certain plugins from measurement to avoid build failures (e.g., with ReactRefreshPlugin or MiniCssExtractPlugin). It supports multiple output formats (human, JSON, custom) and can write results to a file. Release cadence is low; last update was around 2021.

npm install speed-measure-webpack-v5-plugin
INSTALL
IMPORT
SIG · SPEED-MEASURE-WEBP
S
speed-measure-webpack-v5-plugin
devopsjavascriptv1.5.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SpeedMeasurePlugin
const SpeedMeasurePlugin = require('speed-measure-webpack-v5-plugin');
import SpeedMeasurePlugin from 'speed-measure-webpack-v5-plugin';
Package does not export ESM; use CommonJS require. There is no default export for ES modules.
SpeedMeasurePlugin
import SpeedMeasurePlugin from 'speed-measure-webpack-v5-plugin';
import { SpeedMeasurePlugin } from 'speed-measure-webpack-v5-plugin';
Named import does not exist; must import default even if using ESM syntax with bundler that handles CJS interop.

Demonstrates basic usage: wrap your webpack config with smp.wrap() to measure build times.

const SpeedMeasurePlugin = require('speed-measure-webpack-v5-plugin'); const smp = new SpeedMeasurePlugin(); const webpackConfig = smp.wrap({ entry: './src/index.js', output: { path: __dirname + '/dist', filename: 'bundle.js' }, plugins: [ // your plugins ], module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' } ] } }); module.exports = webpackConfig;
Debug
Known issues
gotchaWhen using certain plugins (e.g., ReactRefreshPlugin, MiniCssExtractPlugin), SMP may cause build failures or break HMR. Must exclude these plugins via the second argument to wrap().
fix
smp.wrap(config, ['ReactRefreshPlugin', 'MiniCssExtractPlugin'])
affects: >=1.0.0 <2.0.0
deprecatedThe original package 'speed-measure-webpack-plugin' is not maintained for webpack v5. Users should migrate to this fork.
fix
Replace require('speed-measure-webpack-plugin') with require('speed-measure-webpack-v5-plugin').
affects: >=0
gotchaSMP does not support webpack v5's persistent caching; measurements may be inaccurate if persistent caching is enabled.
fix
Disable persistent caching when measuring: set cache: false in webpack config.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'speed-measure-webpack-v5-plugin'
Package not installed or incorrectly spelled.
fix
Run 'npm install --save-dev speed-measure-webpack-v5-plugin'
TypeError: smp.wrap is not a function
Importing incorrectly (e.g., named import instead of default).
fix
Use: const SpeedMeasurePlugin = require('speed-measure-webpack-v5-plugin');
const smp = new SpeedMeasurePlugin();
Module build failed: TypeError: The 'compilation' argument must be an instance of Compilation
SMP is incompatible with webpack v5's new Compilation instance. This may occur when using certain plugins.
fix
Exclude problematic plugins via smp.wrap(config, ['PluginName']). If issue persists, use older webpack version.
Upgrade
Version history
1.5.2latest on npm
Audit
Dependencies
webpackrequiredPeer dependency; works with webpack 1-5
Agent activity
6 hits · last 30 days
node
6
Resources
speed-measure-webpack-v5-plugin — npm install speed-measure-webpack-v5-plugin · libregistry