Registry / devops / vite-plugin-time-reporter

vite-plugin-time-reporter

JSON →
library2.3.0jsnpmunverified

A Vite plugin that reports build and dev server startup times. Current version 2.3.0 supports Vite 2,3,4,5 and is ESM+CJS dual-package (ESM-only since v2.2.0). Ships TypeScript types, requires Node >=18. Reports elapsed time for each plugin and total build time in a clean console output. Minimal configuration, no external dependencies beyond Vite as a peer dependency.

npm install vite-plugin-time-reporter
INSTALL
IMPORT
SIG · VITE-PLUGIN-TIME-R
V
vite-plugin-time-reporter
devopsjavascriptv2.3.0
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.

default
import timeReporter from 'vite-plugin-time-reporter'
const timeReporter = require('vite-plugin-time-reporter')
Package is ESM-only since v2.2.0; require() fails in CJS context. Use dynamic import() if needed.
timeReporter (named)
import { timeReporter } from 'vite-plugin-time-reporter'
import timeReporter from 'vite-plugin-time-reporter'
Package also exports a named export `timeReporter` (identical to default). Both work, but default import is more common.
timeReporter (type)
import type { TimeReporterOptions } from 'vite-plugin-time-reporter'
import { TimeReporterOptions } from 'vite-plugin-time-reporter'
Options type is exported; use `import type` for type-only imports to avoid runtime side effects.

Adds the time reporter plugin to a Vite config, showing build and dev server time in console.

import vue from '@vitejs/plugin-vue'; import { defineConfig } from 'vite'; import timeReporter from 'vite-plugin-time-reporter'; export default defineConfig({ plugins: [ vue(), timeReporter() ] });
Debug
Known issues
breakingv2.2.0 dropped CommonJS support; require() throws ERR_REQUIRE_ESM.
fix
Use ESM imports (import) or dynamic import if in a CJS context.
affects: >=2.2.0
breakingv2.0.0 switched to dual ESM/CJS package; may break bundlers that don't support `exports` field.
fix
Ensure your bundler supports the package.json `exports` field, or upgrade to v2.2.0+ (ESM-only).
affects: >=2.0.0 <2.2.0
gotchaThe plugin reports times for subsequent builds (HMR) but may not show all plugin times correctly in watch mode.
fix
Check Vite's `--logLevel` option; the plugin respects Vite's logger verbosity.
affects: all
gotchaInstalling as devDependency is mandatory; production builds will error if listed in dependencies.
fix
Use `npm install --save-dev` (or equivalent).
affects: all
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Using require() on v2.2.0+ which is ESM-only.
fix
Change to `import timeReporter from 'vite-plugin-time-reporter'` or use dynamic import.
Cannot find module 'vite-plugin-time-reporter'
Package not installed or not resolved due to missing exports field support.
fix
Install as dev dependency: `npm install --save-dev vite-plugin-time-reporter`. For older bundlers, upgrade to v2.2.0+.
export 'timeReporter' (imported as 'timeReporter') was not found in 'vite-plugin-time-reporter'
Trying to import named export 'timeReporter' from a version that only has default export (pre-v2.0.0).
fix
Use default import: `import timeReporter from 'vite-plugin-time-reporter'`. Or upgrade to v2.0.0+.
Upgrade
Version history
2.3.0latest on npm
Audit
Dependencies
viterequiredpeer dependency required to function as a Vite plugin
Agent activity
4 hits · last 30 days
node
4
Resources
vite-plugin-time-reporter — npm install vite-plugin-time-reporter · libregistry