browser-refresh
browser-refresh copied to clipboard
Should implement a `refreshAllClientJS' function in the refresher
https://github.com/patrick-steele-idem/browser-refresh/blob/master/lib/client/refresher.js
I would suggest to implement the client JS refresher, this could help the user to call this function in browser-refresh-client
after filtering out the client/*.js
, so that the users could enjoy the fast changes for their client JS without refreshing the page. ;)
Any idea for my suggestion?
Hot-reloading JS on pages sounds like a nice idea but that would quickly turn into hell on earth.
Just think of constants for a second, this action would try to redefine them which doesn't make sense. Scripts that change parts of the site would run again and run into errors as whatever the initial state of the page should have been is not what the script encounters.
Of course I could go on and of course we could define what explicitly should
be allowed to be reloaded, but still I think this doesn't make any sense at all.
JS is not like CSS.