-
-
Notifications
You must be signed in to change notification settings - Fork 83
put live-reload middleware above main app #85
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
Conversation
Pull Request Test Coverage Report for Build 280
💛 - Coveralls |
|
What happens if you use this in conjunction with the live reload browser plugin? |
|
Oh, good question. I don't have the extension so I didn't check. Happy to install it and test that. Ok if I just test with Chrome, or do you think I should check extensions on other browsers too? |
|
I installed the Chrome LiveReload extension and tested this out. Seemd to work as expected.
I also fired up the network tab in devtools to see if the page gets reloaded twice, or something like that, and didn't see anything fishy. I'm assuming that the live-reload.js that's injected by connect-livereload will not activate if it detects that the livereload extension is already active. |
|
Hey thanks for this! Sorry about the delay. Big delivery at work. I'll try and get to this in the next couple of days. |
|
No need to apologize! You're the one maintaining awesome free software for anyone to use that wants it! |
|
+1, I had problems with live reload working and manually making this change fixed it for me. |
F1LT3R
left a comment
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.
Look great! Working well. Thanks for submitting this.
Live reload wasn't working for me. I poked around a bit and saw that the
live-reload.jswasn't getting injected into the rendered HTML. Reading the connect-livereload docs it looks like that's because it needs to be inserted in the connect middleware stack before any routes that we want it to inject the live-reload.js into:I tested this locally and it fixed things for me - live-reload wasn't working before, and is now.