Dev.to
5/11/2026

How I Added Pre-Rendering to a Vite Multi-Page App Without SSR
Short summary
The author solved SEO crawler issues on a 1,449-page Vite multi-page app by creating a custom build-time plugin that injects SEO content (H1 tags, meta descriptions, FAQs) into static HTML—avoiding the need for full server-side rendering while maintaining static hosting on Cloudflare Pages. The lightweight solution handles 25+ languages with negligible build overhead (~0.3s), enabling crawlers to index content on first pass while JavaScript runtime replaces it with interactive UI.
- •Built Vite plugin to inject SEO content (H1 tags, descriptions, FAQs) into static HTML at build time
- •Solves empty-page crawler problem for multi-page apps on static hosting (e.g., Cloudflare Pages)
- •Negligible build overhead (~0.3s) with Ahrefs-verified improvements across 25 languages
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



