Jump to content

How to achieve Hot Code Replacement (without Browser reload)?


Nodragem
 Share

Recommended Posts

Hello, 

[Please note that I posted a similar post in the BabylonJS part of the forum, as I thought it was also relevant there, if you think this is not a right use of the forum, feel free to delete this thread]

I am playing around with webpack and I discovered the Hot Module Replacement (HMR) functionality.

Do you think that it could be used to hotswap code as in this PlayCanvas video:

 

I mean, that is quite fascinating, right?

If we can find a way to make it work in Phaser (and hopefully other HTML5 engines such as BabylonJS), I am happy to write an article in the documentation.

Useful References:

- doc of Playcanvas: https://developer.playcanvas.com/en/user-manual/scripting/hot-reloading/

- doc of webpack: https://webpack.js.org/api/hot-module-replacement/

- monkey-hot-loader, a library that abuses webpack HMR but I did not understand clearly what this is doing: https://jlongster.com/Backend-Apps-with-Webpack--Part-III 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...