browserify-hmr icon indicating copy to clipboard operation
browserify-hmr copied to clipboard

[Feature-request] Dispatch custom DOM events when HMR updates modules

Open nesterow opened this issue 5 years ago • 0 comments

Hello, I don't know if this project accepts feature requests, but anyway...

There are cases when dispatching a DOM event could be very useful. For example, I use Turbolinks in my project so I need to call window.location.reload() in order to get updated script. I could subscribe to the HMR socket, but subscribing to an event seems like better solution, because in that case I don't need to check if my application uses development build or production version (hmr wouldn't get to prod build anyway and the event wouldn't be triggered).

Currently, I use a custom version from forked repository, but I think this feature would be useful for someone else.

nesterow avatar May 10 '19 22:05 nesterow