A utility to wrap Vite plugins and measure lifecycle hook execution time, helping identify build performance bottlenecks. Current stable version is 2.0.1, released as part of the weapp-vite monorepo. It supports wrapping single or array of plugins, allows filtering by hook name or threshold, and provides custom logging, formatting, and callback for integration with monitoring systems. Compatible with async hooks. The default hook list covers common Vite plugin hooks like `transform`, `load`, `resolveId`. Differentiators: lightweight, zero-config start, but also flexible for advanced use; includes a built-in default hook list and supports `'all'` to wrap every function hook.
npm install vite-plugin-performanceVerified import paths — ran on the pinned version, not inferred.
Wraps vite-plugin-inspect with performance tracking, logging hooks longer than 50ms.
Use ESM imports and set type: module in package.json or use .mjs extension.
Upgrade Node to ^20.19.0 or >=22.12.0.
Use `silent` instead of `slient` in options.
Replace `slient` with `silent`.
Ensure you pass either a single plugin object or an array of plugin objects. If passing an array, validate all elements are valid plugins.
Use import syntax instead of require(). Set type: module in package.json or rename file to .mjs.
Run pnpm add -D vite-plugin-performance (or npm/yarn) and ensure the import path matches.
No dependency data recorded yet.