Closed FredKSchott closed 4 years ago
This sounds very promising and the implementation makes a lot of sense. Sending the name of the file that changed is something I'd thought about before (inspired by how hot reloading css used to happen).
I never dared dig into how it might work for JS but luckily the likes of you and Jovi are on the case! Will take a closer look and get back to you with any thoughts!
Sounds good! Closing this issue, but feel free to create new ones for any specific issues that come up
/cc @lukejacksonn
I'm not sure if you have any interest in implementing HMR on Servor, but I'd still love to hear your thoughts on this.
Check out the reference implementation in the repo. Feel free to grab that file, it should be all you need on the client-side to add HMR support to Servor. Server-side, you'd only need to add to your
/livereload
the ability to send down updates of individual files/urls that have changed instead of full "reload" events. The client-side would then decide if a full-page reload was required or if an an individual file update could be handled via HMR.