Files
devstar_introduction/node_modules/vitepress/dist/client/app/ssr.js
2025-07-26 16:40:29 +08:00

11 lines
346 B
JavaScript

// entry for SSR
import { renderToString } from 'vue/server-renderer';
import { createApp } from './index';
export async function render(path) {
const { app, router } = await createApp();
await router.go(path);
const ctx = { content: '', vpSocialIcons: new Set() };
ctx.content = await renderToString(app, ctx);
return ctx;
}