From c4ecf9b56d8ca6c57994fa933d40f8658cb8f696 Mon Sep 17 00:00:00 2001 From: Wang Jian Date: Thu, 12 May 2022 10:50:11 +0800 Subject: [PATCH] fix: remove useless `/__vite_ping` handler https://github.com/vitejs/vite/pull/6819 changed the way to reconnect hmr, `/__vite_ping` is useless now. --- packages/vite/src/node/server/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/vite/src/node/server/index.ts b/packages/vite/src/node/server/index.ts index aaf0533337c700..d5767cc2146c6c 100644 --- a/packages/vite/src/node/server/index.ts +++ b/packages/vite/src/node/server/index.ts @@ -496,12 +496,6 @@ export async function createServer( // open in editor support middlewares.use('/__open-in-editor', launchEditorMiddleware()) - // hmr reconnect ping - // Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...` - middlewares.use('/__vite_ping', function viteHMRPingMiddleware(_, res) { - res.end('pong') - }) - // serve static files under /public // this applies before the transform middleware so that these files are served // as-is without transforms.