mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(vite): don't force protocol if disabled devServer.https
(#29049)
This commit is contained in:
parent
d6387e22e6
commit
be7bb4a67f
@ -184,7 +184,7 @@ export async function buildClient (ctx: ViteBuildContext) {
|
|||||||
if (clientConfig.server && clientConfig.server.hmr !== false) {
|
if (clientConfig.server && clientConfig.server.hmr !== false) {
|
||||||
const serverDefaults: Omit<ServerOptions, 'hmr'> & { hmr: Exclude<ServerOptions['hmr'], boolean> } = {
|
const serverDefaults: Omit<ServerOptions, 'hmr'> & { hmr: Exclude<ServerOptions['hmr'], boolean> } = {
|
||||||
hmr: {
|
hmr: {
|
||||||
protocol: ctx.nuxt.options.devServer.https ? 'wss' : 'ws',
|
protocol: ctx.nuxt.options.devServer.https ? 'wss' : undefined,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if (typeof clientConfig.server.hmr !== 'object' || !clientConfig.server.hmr.server) {
|
if (typeof clientConfig.server.hmr !== 'object' || !clientConfig.server.hmr.server) {
|
||||||
|
Loading…
Reference in New Issue
Block a user