You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Incorrect dynamic script returned when hostname and ember server are on different ports. Setting options.liveReloadPort breaks the loading of livereload.js script
#56
Closed
sumeetattree opened this issue
Oct 10, 2018
· 3 comments
Background:
Ember server running on 192.168.0.244:4200
Rails server that serves the built app is running on 192.168.0.244:3000
We are following the ember-cli-deploy lightning method which pushes the built html file to redis store which is then served via rails.
There are two things that are going on here:
if you set liveReloadPort: 4200, nothing happens. livereload.js is still served from 192.168.0.244:3000. I suspect it is due to these lines here
If they are same, which they are in this case, liveReloadPort never gets set. Which would be fine if the script was actually loaded from 4200 but it looks at the location.port which is 3000
If you set liveReloadPort: 4700 (some arbitrary number), the generated dynamic script breaks on this line with this error:
Unrelated; could I also interest you in exposing liveReloadBaseUrl, liveReloadPort, and liveReloadHost via ember-cli-build config? Currently we are serving these files from a different port (4200) than the server that's serving the files (3000). Something like this would be ideal:
These options can then be merged like so on this line
serverMiddleware: function(config){varself=this;varapp=config.app;varoptions=config.options;// this will becomevaroptions=Object.assign(config.options,this.app.options.emberCLILiveReload)
The text was updated successfully, but these errors were encountered:
Even when no changes are made to a brand new project (ember version 2.18, ember-cli-inject-live-reload version 2.0.0), the below error is shown and when downgraded to ember-cli-inject-live-reload version 1.8.2 - no error is shown and all is good.
buschtoens
added a commit
to buschtoens/ember-cli-inject-live-reload
that referenced
this issue
Oct 15, 2018
Background:
Ember server running on
192.168.0.244:4200
Rails server that serves the built app is running on
192.168.0.244:3000
We are following the
ember-cli-deploy
lightning method which pushes the built html file to redis store which is then served via rails.There are two things that are going on here:
liveReloadPort: 4200
, nothing happens. livereload.js is still served from192.168.0.244:3000
. I suspect it is due to these lines hereIf they are same, which they are in this case,
liveReloadPort
never gets set. Which would be fine if the script was actually loaded from4200
but it looks at thelocation.port
which is3000
liveReloadPort: 4700
(some arbitrary number), the generated dynamic script breaks on this line with this error:Unrelated; could I also interest you in exposing
liveReloadBaseUrl, liveReloadPort, and liveReloadHost
via ember-cli-build config? Currently we are serving these files from a different port (4200) than the server that's serving the files (3000). Something like this would be ideal:These options can then be merged like so on this line
The text was updated successfully, but these errors were encountered: