Skip to content

Commit

Permalink
Merge pull request ember-cli#28 from jgoclawski/patch-1
Browse files Browse the repository at this point in the history
Fix overriding baseURL
  • Loading branch information
rwjblue authored Jul 18, 2016
2 parents bf144a1 + 029dbfe commit 5cbe83e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ module.exports = {
var self = this;
var app = config.app;
var options = config.options;
// maintaining `baseURL` for backwards compatibility. See: http://emberjs.com/blog/2016/04/28/baseURL.html
var baseURL = options.liveReloadBaseUrl || options.rootURL || options.baseURL;

if (options.liveReload !== true) { return; }

process.env.EMBER_CLI_INJECT_LIVE_RELOAD_PORT = options.liveReloadPort;
process.env.EMBER_CLI_INJECT_LIVE_RELOAD_BASEURL = options.liveReloadBaseUrl || options.baseURL;
process.env.EMBER_CLI_INJECT_LIVE_RELOAD_BASEURL = baseURL;

app.use(options.baseURL + 'ember-cli-live-reload.js', function(request, response, next) {
app.use(baseURL + 'ember-cli-live-reload.js', function(request, response, next) {
response.contentType('text/javascript');
response.send(self.dynamicScript());
});
Expand Down

0 comments on commit 5cbe83e

Please sign in to comment.