Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit fb24c86

Browse files
authored
Merge pull request #185 from sveltejs/gh-165
use window.location.hostname in dev client
2 parents 542115f + 61000a4 commit fb24c86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sapper-dev-client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function check() {
1111
export function connect(port) {
1212
if (source || !window.EventSource) return;
1313

14-
source = new EventSource(`http://localhost:${port}/__sapper__`);
14+
source = new EventSource(`http://${window.location.hostname}:${port}/__sapper__`);
1515

1616
window.source = source;
1717

0 commit comments

Comments
 (0)