From c0114435a07bcecc127c0cea2cf25f93381b40da Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 12 Nov 2024 14:16:57 +0900 Subject: [PATCH] docs: note about a silly edge case in the ssr guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit resolve #1721 https://github.com/vitejs/vite/commit/584a573e1fdfa64018b2c56d147f2b4fec2d9733 の反映です。 --- guide/ssr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/ssr.md b/guide/ssr.md index 28813069..b3f5ddeb 100644 --- a/guide/ssr.md +++ b/guide/ssr.md @@ -149,7 +149,7 @@ app.use('*', async (req, res, next) => { const appHtml = await render(url) // 5. アプリケーションのレンダリングされた HTML をテンプレートに挿入します。 - const html = template.replace(``, appHtml) + const html = template.replace(``, () => appHtml) // 6. レンダリングされた HTML をクライアントに送ります。 res.status(200).set({ 'Content-Type': 'text/html' }).end(html)