mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-21 06:45:00 +00:00
Merge pull request #185 from sveltejs/gh-165
use window.location.hostname in dev client
This commit is contained in:
@@ -11,7 +11,7 @@ function check() {
|
|||||||
export function connect(port) {
|
export function connect(port) {
|
||||||
if (source || !window.EventSource) return;
|
if (source || !window.EventSource) return;
|
||||||
|
|
||||||
source = new EventSource(`http://localhost:${port}/__sapper__`);
|
source = new EventSource(`http://${window.location.hostname}:${port}/__sapper__`);
|
||||||
|
|
||||||
window.source = source;
|
window.source = source;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user