ember-cli / ember-cli-inject-live-reload

Ember CLI plugin that injects live-reload script into HTML content
MIT License
22 stars 54 forks source link

--live-reload-* command line options need documentation #53

Open Redsandro opened 6 years ago

Redsandro commented 6 years ago

I am trying to change my live-reload-host to localhost because my http port is proxied to a development url. It's unclear to find out how to do this.

$ ./node_modules/.bin/ember help | grep reload
  --live-reload (Boolean) (Default: true)
  --live-reload-host (String) Defaults to host
  --live-reload-base-url (String) Defaults to baseURL
  --live-reload-port (Number) (Defaults to port number within [49152...65535])

Needs documentation.

I can't seem to change the javascript location. It's always {{rootURL}}/{{baseUrl}}/livereload.js. But I need to change the rootURL for the livereload location only.


ember-cli: 3.3.0
http_parser: 2.8.0
node: 8.12.0
v8: 6.2.414.66
uv: 1.19.2
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2p
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c
os: linux x64
npm: 6.4.1
Redsandro commented 6 years ago

I was specifying the options wrong. The documentation is not entirely clear. Now that I specified host, the host doesn't change. livereload.js is still requested from the same domain as the domain. What is this option for anyway?

Redsandro commented 6 years ago

What is this option for anyway?

Ah, it seems to change the hostname for the connection to the websocket that is opened. And then livereload doesn't work anymore, because from a security context, the websocket needs to be on the same hostname. So both hostnames would have to change; the one where the livereload.js is loaded from, and the one where the websocket is connecting to.