Skip to content

Commit d41f1f2

Browse files
committed
next: Fixed an issue with hmr when targeting the dev:api
1 parent 6f728d2 commit d41f1f2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Exceptionless.Web/ClientApp/vite.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ function getAspNetConfig() {
9191
}
9292

9393
const wsUrl = url.replace('https://', 'wss://').replace('http://', 'ws://');
94-
const hmrRemoteProtocol = codespaceName ? 'wss' : wsUrl.startsWith('wss') ? 'wss' : 'ws';
94+
95+
let hmrRemoteProtocol = 'ws';
96+
if (codespaceName || (wsUrl.startsWith('wss') && hmrRemoteHost !== 'localhost')) {
97+
hmrRemoteProtocol = 'wss';
98+
}
9599

96100
return {
97101
hmr: {

0 commit comments

Comments
 (0)