Merge pull request #185 from sveltejs/gh-165

use window.location.hostname in dev client
This commit is contained in:
Rich Harris
2018-03-10 10:44:48 -05:00
committed by GitHub

View File

@@ -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;