ember-cli-inject-live-reload
ember-cli-inject-live-reload copied to clipboard
Simplify livereload injection by removing the script.
This is one approach to solving #22 and #13.
This PR removes the dynamically generated script, and loads it from the livereload server directly.
It uses new configuration variable options.liveReloadHost
(implemented in https://github.com/ember-cli/ember-cli/commit/7a6a47e12df5c6fda7fc8c3cdfb8e3237bfbe848) and will take into account options.ssl
to avoid mixed content warnings.
If we also wanted to shrink the CSP list, we could resurrect the app.use
to serve livereload.js ourselves (or proxy to tinylr's server). We'd still have the ability to set the livereload server and hostname that way, since it accepts host and port options on the query string. In that case, you simply call it like this:
http://emberhost/livereload.js?snipver=1&host=liveReloadHost&port=liveReloadPort
ping?
I like this approach. Any life on this?
I like this approach too and we are currently using this 👍
I'm in favor of an approach like this and would volunteer to rebase if the PR would be welcomed and merged.