Macil / browserify-hmr

Hot Module Replacement plugin for Browserify
MIT License
373 stars 26 forks source link

Updating a module without update accepts bubbles up incorrectly #14

Open Macil opened 8 years ago

Macil commented 8 years ago

Noting this to myself to fix sometime.

If a module without any update accepters gets an update, then the update bubbles up as the system looks to see if its parents might have update accepters, but if we reach an entry script that isn't accepting updates of itself, we should decline the update. Instead, right now the update is incorrectly accepted, and the module and all of its parents all the way up to the entry module are re-executed. This can cause lots of issues (until the user refreshes). This appears as a console message "[HMR] Updated modules" followed by an array of a lot of modules all the way down to the entry script.

Tests for this exist in the "fail" branch.