mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-11 19:04:30 +00:00
use window.location.hostname in dev client - fixes #165
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user