Skip to content

Commit 0e58633

Browse files
authored
chore: make it a named function
1 parent 5d57541 commit 0e58633

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/vite/src/node/server/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,8 @@ export async function _createServer(
609609
middlewares.use('/__open-in-editor', launchEditorMiddleware())
610610

611611
// ping request handler
612-
middlewares.use((req, res, next) => {
612+
// Keep the named function. The name is visible in debug logs via `DEBUG=connect:dispatcher ...`
613+
middlewares.use(function viteHMRPingMiddleware(req, res, next) {
613614
if (req.headers['accept'] === 'text/x-vite-ping') {
614615
res.writeHead(204).end()
615616
} else {

0 commit comments

Comments
 (0)