{"id":46763,"library":"vite-plugin-warmup","title":"Vite Warmup Plugin","description":"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.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/bluwy/vite-plugin-warmup","tags":["javascript","vite-plugin","warmup","typescript"],"install":[{"cmd":"npm install vite-plugin-warmup","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-warmup","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-warmup","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, requires Vite >=4.3","package":"vite","optional":false}],"imports":[{"note":"Named export, not default. TypeScript types included.","wrong":"import warmup from 'vite-plugin-warmup'","symbol":"warmup","correct":"import { warmup } from 'vite-plugin-warmup'"},{"note":"ESM-only; warmupFile is a utility function for programmatic warmup.","wrong":"const { warmupFile } = require('vite-plugin-warmup')","symbol":"warmupFile","correct":"import { warmupFile } from 'vite-plugin-warmup'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport { warmup } from 'vite-plugin-warmup';\n\nexport default defineConfig({\n  plugins: [\n    warmup({\n      clientFiles: ['./**/*.html', './src/components/*.jsx'],\n      ssrFiles: []\n    })\n  ]\n});","lang":"typescript","description":"Demonstrates basic Vite config with warmup plugin to pre-transform HTML and JSX files on server start."},"warnings":[{"fix":"Do not use with middlewareMode; consider alternative warmup strategies.","message":"Does not work with `middlewareMode`.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"","message":"Deprecated? No warnings yet. Plugin is new and stable.","severity":"deprecated","affected_versions":""},{"fix":"Ensure all paths in clientFiles/ssrFiles correspond to real files.","message":"Only actual files in the file system are supported; cannot warm up virtual modules or URLs.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use DEBUG='vite:transform' to verify warmup is happening; if not, use warmupFile() programmatically.","message":"Metaframeworks that don't load files through Vite directly may not work with this plugin.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Only warm up files known to be on the hot path.","message":"Enabling too many files may overload the Vite server on startup.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.0':34 '2023':36 '4.3':99 'ahead':94 'cach':13,89 'cadenc':41 'client':58 'current':31 'deep':83 'demand':78 'dev':28 'differenti':43 'file':17,61,93 'focus':44 'framework':53 'framework-specif':52 'glob':63 'graph':85 'hot':91 'hot-path':90 'import':20 'initi':30 'integr':66 'irregular':39 'issu':87 'javascript':105 'js':21 'key':42 'middlewaremod':104 'modul':22,84 'nativ':70 'natur':79 'on-demand':76 'path':92 'pattern':64 'pipelin':72 'plugin':3,6,108 'pre':9 'pre-warm':8 'recurs':23 'releas':35,40 'requir':97 'server':29 'solut':55 'solv':74 'soon':25 'specif':54 'specifi':16 'ssr':60 'stabl':32 'support':56,103 'time':96 'transform':12,15,71 'typescript':110 'version':33 'via':62 'vite':1,5,68,81,98,107 'vite-plugin':106 'warm':10,47 'warm-up':46 'warmup':2,109 'waterfal':86","created_at":"2026-06-07T13:01:30.806384+00:00","updated_at":"2026-06-07T13:01:30.806384+00:00","problems":[{"fix":"Run npm install vite-plugin-warmup","cause":"Package not installed.","error":"Error: Cannot find module 'vite-plugin-warmup'"},{"fix":"Use import { warmup } from 'vite-plugin-warmup'","cause":"Incorrect import (default instead of named).","error":"TypeError: (0 , warmup) is not a function"},{"fix":"Switch to ESM: use import or dynamic import().","cause":"Using require() instead of import.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/bluwy/vite-plugin-warmup#readme","github":"https://github.com/bluwy/vite-plugin-warmup","docs":null,"changelog":null,"pypi":null,"npm":"vite-plugin-warmup","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}