I just implemented https://www.npmjs.com/package/browserify-hmr, so I'm speaking from my experience there: There's really not much magic involved. `module.hot` has some methods for managing book-keeping about what modules accept updates. When an update is detected, the appropriate dispose callbacks are called, the accepted modules are dropped from the module cache, and then the accepted modules are re-executed with the new code. The bookkeeping about managing changes of dependencies can be a bit painful but there isn't much surprising in it.
– MacilAug 25 '15 at 23:25