docs: note about a silly edge case in the ssr guide (#18628)

This commit is contained in:
andriibeee 2024-11-11 22:42:07 +02:00 committed by GitHub
parent f39896e7ff
commit 584a573e1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,7 +149,7 @@ app.use('*', async (req, res, next) => {
const appHtml = await render(url)
// 5. Inject the app-rendered HTML into the template.
const html = template.replace(`<!--ssr-outlet-->`, appHtml)
const html = template.replace(`<!--ssr-outlet-->`, () => appHtml)
// 6. Send the rendered HTML back.
res.status(200).set({ 'Content-Type': 'text/html' }).end(html)