A Vite plugin (v1.0.5) that monitors heap and RSS memory usage during the build process. It records memory snapshots at configurable intervals, tracks peak usage per build phase, and outputs a summary of the top memory-consuming phases. The plugin supports pretty or JSON log formats, exclusion of specific hooks from logging, and optional uncaught exception capture. It requires Node >=22.0.0 and ships TypeScript declarations. Compared to generic process monitoring, this plugin provides phase-level tracking integrated with Vite's build hooks (buildStart, renderChunk, etc.).
npm install vite-build-monitorVerified import paths — ran on the pinned version, not inferred.
Configure vite-build-monitor as a Vite plugin with custom options: log file path, polling interval, log format, and hook exclusions.
Upgrade Node.js to v22 or later.
Explicitly set sampleIntervalMs to at least 50 if you need fine-grained polling.
Always use an absolute path or ensure cwd is the project root when specifying logFile.
Pin to a specific version and review changelog before upgrading.
Use import statement: import memoryMonitor from 'vite-build-monitor';
Call the function: plugins: [memoryMonitor({ ... })]Ensure the package is installed: pnpm add -D vite-build-monitor
No dependency data recorded yet.