-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added liveReloadJsUrl config #37
base: master
Are you sure you want to change the base?
Conversation
@williamweckl This fix resolves my problem. Test on my project and it worked correctly. |
|
||
app.use(baseURL + 'ember-cli-live-reload.js', function(request, response, next) { | ||
response.contentType('text/javascript'); | ||
response.send(self.dynamicScript(options)); | ||
response.send(self.dynamicScript()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This point memory leakage.
https://auth0.com/blog/four-types-of-leaks-in-your-javascript-code-and-how-to-get-rid-of-them/
if (liveReloadOptions.snipver === undefined) { | ||
liveReloadOptions.snipver = 1; | ||
} | ||
dynamicScript: function(request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable request
is never used!
@@ -5,23 +5,18 @@ module.exports = { | |||
|
|||
contentFor: function(type) { | |||
var liveReloadPort = process.env.EMBER_CLI_INJECT_LIVE_RELOAD_PORT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable liveReloadPort
is never used!
@@ -5,23 +5,18 @@ module.exports = { | |||
|
|||
contentFor: function(type) { | |||
var liveReloadPort = process.env.EMBER_CLI_INJECT_LIVE_RELOAD_PORT; | |||
var baseURL = process.env.EMBER_CLI_INJECT_LIVE_RELOAD_BASEURL; | |||
|
|||
if (liveReloadPort && type === 'head') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change liveReloadPort
by liveReloadJsUrl
According to the docs, the configuration to change javascript url is liveReloadJsUrl. Unfortunately, no code is using this config.
This PR fixes that.