{"id":22883,"library":"vite-plugin-time-reporter-vite7","title":"vite-plugin-time-reporter","description":"A Vite plugin that reports build and dev server startup times. Version 2.3.2 supports Vite 2, 3, 4, 5, and 7 (via a forked package). Provides a simple, configurable time log for each Vite run, displaying formatted durations for key phases like resolving plugins, loading config, and building. Unlike manual console.time calls or full-featured profiling tools, this plugin is lightweight, zero-config, and integrates directly into the Vite plugin lifecycle. Published on npm with two packages: `vite-plugin-time-reporter` for Vite ≤5 and `vite-plugin-time-reporter-vite7` for Vite 7. Ships TypeScript declarations and is actively maintained (2025).","status":"active","version":"2.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/benjamin-tw/vite-plugin-time-reporter","tags":["javascript","vite","vite-plugin","time","reporting","report","plugin","vitejs","awesome","typescript"],"install":[{"cmd":"npm install vite-plugin-time-reporter-vite7","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-time-reporter-vite7","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-time-reporter-vite7","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin hooks into Vite's build and dev server lifecycle","package":"vite","optional":false}],"imports":[{"note":"Default export; for Vite 7, use 'vite-plugin-time-reporter-vite7'","symbol":"timeReporter","correct":"import timeReporter from 'vite-plugin-time-reporter'"},{"note":"Type-only import for type definitions; not available in CJS","symbol":"TimeReporterOptions","correct":"import type { TimeReporterOptions } from 'vite-plugin-time-reporter'"},{"note":"CommonJS require must access .default because the package is ESM-first","wrong":"const timeReporter = require('vite-plugin-time-reporter')","symbol":"timeReporter","correct":"const timeReporter = require('vite-plugin-time-reporter').default"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport vue from '@vitejs/plugin-vue';\nimport timeReporter from 'vite-plugin-time-reporter';\n\nexport default defineConfig({\n  plugins: [vue(), timeReporter()],\n});","lang":"typescript","description":"Shows how to configure the plugin in vite.config.ts with a Vue project."},"warnings":[{"fix":"Install vite-plugin-time-reporter-vite7 instead of vite-plugin-time-reporter when using Vite 7.","message":"Package split into two npm packages for Vite 7 compatibility. vite-plugin-time-reporter (v2.x) does not work with Vite 7; use vite-plugin-time-reporter-vite7 for Vite 7.","severity":"breaking","affected_versions":">=7.0.0 of Vite"},{"fix":"Remove any arguments passed to timeReporter(). Previously configurable options are now automatically set.","message":"Removed options argument; timeReporter() now accepts no parameters.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Add timeReporter() last in the plugins array, or at least after plugins that transform code.","message":"Plugin must be placed after other transform plugins (e.g., vue) in the plugins array to capture accurate timing.","severity":"gotcha","affected_versions":"all"},{"fix":"Monitor the GitHub repository for future consolidation.","message":"The package name 'vite-plugin-time-reporter-vite7' is considered a fork and may not receive updates alongside the main package.","severity":"deprecated","affected_versions":">=2.3.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev vite-plugin-time-reporter-vite7` for Vite 7, or the correct package for your Vite version.","cause":"Missing devDependency or using wrong package name for Vite 7.","error":"Cannot find module 'vite-plugin-time-reporter' or its corresponding type declarations."},{"fix":"Use `const timeReporter = require('vite-plugin-time-reporter').default` (or switch to ESM import).","cause":"CommonJS require without .default.","error":"TypeError: timeReporter is not a function"},{"fix":"Ensure timeReporter() is called only once in the plugins array.","cause":"Multiple instances of timeReporter added to plugins array.","error":"The plugin 'vite:time-reporter' collides with another plugin with the same name."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}