webpack-hot-middleware
webpack-hot-middleware copied to clipboard
feat: add disconnect on event source wrapper
This PR contains a:
- [ ] bugfix
- [x] new feature
- [ ] code refactor
- [ ] test update
- [ ] typo fix
- [ ] metadata update
Motivation / Use-Case
Add disconect on EventSourceWrapper for making close eventSource manually possible.
Breaking Changes
Additional Info
This code appears correct, but could you describe a use-case which would motivate doing this?
My case is that I want to close connection if the browser tab is hidden or minimized and refresh page when tab gets activated again for preventing reaching connection limitations.