elucid / ember-cli-redis-proxy

Write index.html to redis on each build
MIT License
4 stars 3 forks source link

Live reload no longer works #1

Open drewchandler opened 9 years ago

drewchandler commented 9 years ago

The injected live reload tag isn't affected by the fingerprinting prepend option so it 404s.

<script src="/ember-cli-live-reload.js" type="text/javascript"></script>

Maybe the real issue is that ember-cli-inject-live-reload needs to be more configurable?

elucid commented 9 years ago

Yeah, I've had the same thought. I'm currently using this with an in-app addon that is basically ember-cli-live-reload but loads the js resource with a full path.

Another possibility is that this addon could include its own middleware for live reloads. I wanted to add middleware anyhow to support CORS in for font requests.

drewchandler commented 9 years ago

Here is the work around I am using in my Rails app using the rack-forward gem.

In config/environments/development.rb:

  config.middleware.use Rack::Forward do |req|
    if req.path == '/ember-cli-live-reload.js'
      URI.parse('http://localhost:4200/ember-cli-live-reload.js')
    end
  end
elucid commented 9 years ago

I've used a http proxy to work around this as well. Ideally, however, users of the addon wouldn't have to resort to something like this and live reload would Just Work™