From c1c12bece21f8913d7a78bb416bb6076e72db9b8 Mon Sep 17 00:00:00 2001 From: patak Date: Fri, 17 Nov 2023 11:28:17 +0100 Subject: [PATCH] docs: indirect use vite.middlewares in example --- docs/guide/api-javascript.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) +}) ```