fix(vite): prefer hmr ws protocol (#4203)

This commit is contained in:
Dizzy Rogers 2022-04-09 06:09:43 -04:00 committed by GitHub
parent 396472778f
commit 26f8d8eb8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -106,6 +106,8 @@ async function bundle (nuxt: Nuxt, builder: any) {
ignored: isIgnored
},
hmr: {
// https://github.com/nuxt/framework/issues/4191
protocol: 'ws',
clientPort: hmrPort,
port: hmrPort
},

View File

@ -75,6 +75,8 @@ export async function bundle (nuxt: Nuxt) {
ignored: isIgnored
},
hmr: {
// https://github.com/nuxt/framework/issues/4191
protocol: 'ws',
clientPort: hmrPort,
port: hmrPort
},
@ -106,7 +108,6 @@ export async function bundle (nuxt: Nuxt) {
.then(() => logger.info(`Vite ${env.isClient ? 'client' : 'server'} warmed up in ${Date.now() - start}ms`))
.catch(logger.error)
})
await buildClient(ctx)
await buildServer(ctx)
}