From db8b7490c77f5abfad75f834a07e62ac6fe819d3 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Wed, 13 Oct 2021 19:50:32 +0900 Subject: [PATCH] refactor --- vite-ssg/renderer/_default.page.server.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vite-ssg/renderer/_default.page.server.tsx b/vite-ssg/renderer/_default.page.server.tsx index 52a55bb..1522320 100644 --- a/vite-ssg/renderer/_default.page.server.tsx +++ b/vite-ssg/renderer/_default.page.server.tsx @@ -3,14 +3,16 @@ import { escapeInject, dangerouslySkipEscape } from "vite-plugin-ssr"; import type { PageContextBuiltIn } from "vite-plugin-ssr/types"; export async function render(pageContext: PageContextBuiltIn) { - const { Page } = pageContext; - const html = renderToString(); - - return escapeInject` + const html = renderToString( vite-ssg-example - ${dangerouslySkipEscape(html)} - `; + + + + + ); + + return escapeInject`${dangerouslySkipEscape(html)}`; }