Registry / devops / speed-measure-vite-plugin

speed-measure-vite-plugin

JSON →
library2.0.1jsnpmunverified

A Vite plugin that measures the transform speed of other Vite plugins, currently at version 2.0.1. It wraps plugins and records execution time for hooks like transform, resolveId, and load. Compatible with Vite >= 3.0.0. Differentiators: simple API, supports both build and dev mode (with gap detection), and allows custom hook selection and sort order. Ships TypeScript types. Low bundle size.

npm install speed-measure-vite-plugin
INSTALL
IMPORT
SIG · SPEED-MEASURE-VITE
S
speed-measure-vite-plugin
devopsjavascriptv2.0.1
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 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

smvp
import smvp from 'speed-measure-vite-plugin'
const smvp = require('speed-measure-vite-plugin')
Default import; package is ESM-only. No named export.
SpeedMeasurePlugin
import smvp from 'speed-measure-vite-plugin'
import { SpeedMeasurePlugin } from 'speed-measure-vite-plugin'
There is no named export; use default import.
Options
import type { Options } from 'speed-measure-vite-plugin'
TypeScript users can import the Options interface as a type.

Measures plugin transform speed in a Vite build with Vue.

// vite.config.js import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import smvp from 'speed-measure-vite-plugin' export default defineConfig({ plugins: smvp([vue()], { hooks: ['transform', 'resolveId', 'load'], sort: (a, b) => b - a, maxGapTimeOnce: 1000 }) })
Debug
Known issues
deprecatedOption 'maxTransformTimeOnce' is deprecated. Use 'maxGapTimeOnce' instead.
fix
Replace maxTransformTimeOnce with maxGapTimeOnce in the options object.
affects: >=2.0.0
gotchaThe plugin wraps your plugins; ensure you pass them as an array to smvp, not as separate arguments.
fix
Use smvp([plugin1, plugin2]) instead of smvp(plugin1, plugin2).
affects: *
breakingDefault export changed from named export to default export in v2.0.0.
fix
Use import smvp from 'speed-measure-vite-plugin' instead of import { smvp } from 'speed-measure-vite-plugin'.
affects: >=2.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module speed-measure-vite-plugin not supported
Package is ESM-only, cannot be used with require() in CommonJS context.
fix
Use import() syntax or ensure your project is configured for ESM.
TypeError: smvp is not a function
Using named import { smvp } instead of default import.
fix
Change to import smvp from 'speed-measure-vite-plugin'.
Invalid plugin order: smvp should wrap all plugins
Passing smvp as a plugin itself, not wrapping others.
fix
Wrap your plugins array with smvp: smvp([vue(), ...])
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
viterequiredpeer dependency, required at version >=3.0.0
Agent activity
2 hits · last 30 days
node
2
Resources
speed-measure-vite-plugin — npm install speed-measure-vite-plugin · libregistry