ember-cli-inject-live-reload icon indicating copy to clipboard operation
ember-cli-inject-live-reload copied to clipboard

Simplify livereload injection by removing the script.

Open ghost opened this issue 9 years ago • 5 comments

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.

ghost avatar Jun 11 '15 03:06 ghost

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

ghost avatar Jun 11 '15 03:06 ghost

ping?

ghost avatar Jul 14 '15 02:07 ghost

I like this approach. Any life on this?

jsmecham avatar Jan 19 '16 21:01 jsmecham

I like this approach too and we are currently using this 👍

Kledal avatar Aug 11 '16 13:08 Kledal

I'm in favor of an approach like this and would volunteer to rebase if the PR would be welcomed and merged.

lukemelia avatar Oct 20 '16 17:10 lukemelia