diff --git a/docs/guide/api-javascript.md b/docs/guide/api-javascript.md index 54b1dd0fa2be43..89197c937b73fc 100644 --- a/docs/guide/api-javascript.md +++ b/docs/guide/api-javascript.md @@ -67,7 +67,9 @@ const vite = await createServer({ }, }) -server.use(vite.middlewares) +server.use((req, res, next) => { + vite.middlewares.handle(req, res, next) +}) ```