mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
fix(server): should respect hmr port when middlewareMode=false (#13040)
This commit is contained in:
parent
0c9f1f4a8a
commit
1ee0014caa
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user