0

here is my configuration:

I have a remote site, say something.com where "some" page contents are dynamically loaded from localhost, with an ajax call to a node local server. Remote site listens to grunt-watch server too, and reloads the whole page using livereload.js. Every change on local files force the page to reload, page who re-injects the code from my localhost. And this is smooth.

Next step could be to listen to livereload events, and reload not the whole page, but just reinject the code via a new ajax call.

Is it possible ? I didn't found this kind of event in the doc, there's something, but is about connection established/interrupted.

Any idea ? Thanks :)

Daniele
  • 829
  • 1
  • 13
  • 23

1 Answers1

0

The livereload docs themselves include the following statement:

Would love, but doesn't seem possible: live JS reloading

An alternative is to use the webpack dev server which does support this functionality, via Hot Module Replacement.

duncanhall
  • 11,035
  • 5
  • 54
  • 86