fix(server): should respect hmr port when middlewareMode=false (#13040)

This commit is contained in:
sun0day 2023-05-01 18:43:25 +08:00 committed by GitHub
parent 0c9f1f4a8a
commit 1ee0014caa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)