Skip to content

Commit

Permalink
fix: remove useless /__vite_ping handler
Browse files Browse the repository at this point in the history
vitejs#6819 changed the way to reconnect hmr, `/__vite_ping` is useless now.
  • Loading branch information
wangjianio committed May 12, 2022
1 parent 774bd28 commit c4ecf9b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/vite/src/node/server/index.ts
Expand Up @@ -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.
Expand Down

0 comments on commit c4ecf9b

Please sign in to comment.