We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vitejs
Learn more about funding links in repositories.
Report abuse
1 parent 1ae018f commit 167753dCopy full SHA for 167753d
packages/vite/src/client/client.ts
@@ -23,7 +23,7 @@ const importMetaUrl = new URL(import.meta.url)
23
// use server configuration, then fallback to inference
24
const serverHost = __SERVER_HOST__
25
const socketProtocol =
26
- __HMR_PROTOCOL__ || (location.protocol === 'https:' ? 'wss' : 'ws')
+ __HMR_PROTOCOL__ || (importMetaUrl.protocol === 'https:' ? 'wss' : 'ws')
27
const hmrPort = __HMR_PORT__
28
const socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${
29
hmrPort || importMetaUrl.port
0 commit comments