Skip to content

Commit 9d28ffd

Browse files
authored
docs(ssr): specify the use of express.Router (#8915)
1 parent f280dd9 commit 9d28ffd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/guide/ssr.md

+2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ async function createServer() {
8181
server: { middlewareMode: true },
8282
appType: 'custom'
8383
})
84+
8485
// use vite's connect instance as middleware
86+
// if you use your own express router (express.Router()), you should use router.use
8587
app.use(vite.middlewares)
8688

8789
app.use('*', async (req, res) => {

0 commit comments

Comments
 (0)