A Vite plugin that pre-warms the transform cache by transforming specified files and their imported JS modules recursively as soon as the dev server initializes. Current stable version 0.1.0 (released 2023), with an irregular release cadence. Key differentiators: focuses on warm-up only (not a framework-specific solution), supports both client and SSR files via glob patterns, and integrates with Vite's native transform pipeline. It solves the on-demand nature of Vite and deep module graph waterfall issues by caching hot-path files ahead of time. Requires Vite >=4.3 and does not support middlewareMode.
npm install vite-plugin-warmupNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic Vite config with warmup plugin to pre-transform HTML and JSX files on server start.
Do not use with middlewareMode; consider alternative warmup strategies.
Ensure all paths in clientFiles/ssrFiles correspond to real files.
Use DEBUG='vite:transform' to verify warmup is happening; if not, use warmupFile() programmatically.
Only warm up files known to be on the hot path.
Run npm install vite-plugin-warmup
Use import { warmup } from 'vite-plugin-warmup'Switch to ESM: use import or dynamic import().