Vite 2 utility for Vue 3 server-side rendering with fast HMR, teleport support, and flexible configuration. Latest version 1.1.8 (last release 2022) is stable but in maintenance mode. It provides a seamless SSR setup for Vue 3 apps using Vite, with hooks like created, mounted, and rendered for customization. Key differentiators: small library size, compatibility with Vite plugins, and support for preload/prefetch. However, it requires multiple peer dependencies (@vue/server-renderer, @vueuse/head, node-html-parser, @rollup/plugin-replace) and has a breaking change for Vite >2.7.9 requiring separate client/server entry points. Alternatives like vike (formerly vite-plugin-ssr) are more actively maintained.
npm install vite-ssr-vueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows two entry patterns: separate client/server for Vite >2.7.9 vs unified with plugin for Vite <=2.7.9.
Use 'import ssr from "vite-ssr-vue/client"' and 'import ssr from "vite-ssr-vue/server"' instead of a single main.ts entry.
Switch to separate client/server entry points if using Vite >2.7.9.
Install all peer dependencies: yarn add @vue/server-renderer @vueuse/head node-html-parser @rollup/plugin-replace
Remove any manual alias configuration for SSR in Vite config.
Upgrade to version 1.1.0 or later: npm install vite-ssr-vue@latest
Ensure App.vue is correctly imported and passed to ssr() as shown in the quickstart.
Use 'import ssr from "vite-ssr-vue/client"' and 'import ssr from "vite-ssr-vue/server"' instead.