Skip to content

Commit

Permalink
fix(server): should respect hmr port when middlewareMode=false (#13040)
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0day committed May 1, 2023
1 parent 0c9f1f4 commit 1ee0014
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/server/index.ts
Expand Up @@ -675,6 +675,8 @@ export async function _createServer(
const listen = httpServer.listen.bind(httpServer)
httpServer.listen = (async (port: number, ...args: any[]) => {
try {
// ensure ws server started
ws.listen()
await initServer()
} catch (e) {
httpServer.emit('error', e)
Expand Down

0 comments on commit 1ee0014

Please sign in to comment.