From 61000a4795b7cb5e1ea6394648b5b47493c06493 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 10 Mar 2018 10:26:00 -0500 Subject: [PATCH] use window.location.hostname in dev client - fixes #165 --- sapper-dev-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapper-dev-client.js b/sapper-dev-client.js index d1b59e1..b717a25 100644 --- a/sapper-dev-client.js +++ b/sapper-dev-client.js @@ -11,7 +11,7 @@ function check() { export function connect(port) { if (source || !window.EventSource) return; - source = new EventSource(`http://localhost:${port}/__sapper__`); + source = new EventSource(`http://${window.location.hostname}:${port}/__sapper__`); window.source = source;