webpack-hot-middleware
webpack-hot-middleware copied to clipboard
fix getEventSourceWrapper window on iframe
This PR contains a:
- [x] bugfix
- [ ] new feature
- [ ] code refactor
- [ ] test update
- [ ] typo fix
- [ ] metadata update
Motivation / Use-Case
When using iframes HMR was initializing inside each iframe, this way intead we use the parent instance of window.__whmEventSourceWrapper
so you have no duplicate listeners and no limit on how many iframes you can have before the HMR hungs up with too many calls.
Breaking Changes
None
Additional Info
Codecov Report
Merging #358 (9305296) into master (fe33d59) will decrease coverage by
0.24%
. The diff coverage is87.50%
.
@@ Coverage Diff @@
## master #358 +/- ##
==========================================
- Coverage 88.63% 88.38% -0.25%
==========================================
Files 3 3
Lines 264 267 +3
Branches 76 77 +1
==========================================
+ Hits 234 236 +2
- Misses 30 31 +1
Impacted Files | Coverage Δ | |
---|---|---|
client.js | 83.92% <87.50%> (-0.32%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update fe33d59...9305296. Read the comment docs.
I've tested with iframes and it works good, you can have as many iframes that you want and the hot reloads styles inside and outside the iframes!
Closing for revision in firefox