A Vite plugin for prerendering applications to static HTML using Puppeteer, targeting improved SEO and faster initial page loads. Version 1.0.1 is the current stable release with no recent updates. It supports any framework (Vue, React, Svelte, etc.) and allows configuration of routes and per-route metadata like title, keywords, and description. Unlike other prerender solutions, it runs headless Chrome via Puppeteer and integrates directly into the Vite build pipeline. The plugin is lightweight but lacks TypeScript definitions and has limited documentation.
npm install vite-plugin-prerendererVerified import paths — ran on the pinned version, not inferred.
Shows basic setup: import plugin, configure routes with optional per-route metadata.
Install puppeteer as a dev dependency: `npm install puppeteer -D`.
Use puppeteer-core with a pre-installed Chrome binary, or run in an environment with Chrome available.
None, as the plugin does not expose this.
Run `npx puppeteer browsers install chrome` or install puppeteer with `npm install puppeteer`.
Use: `import vitePluginPrerenderer from 'vite-plugin-prerenderer'`
Switch to `import vitePluginPrerenderer from 'vite-plugin-prerenderer'`
Ensure all routes have an entry in options if you provide options; or omit options entirely if not needed.