rsnext/packages/next/client
JJ Kasper 75748caf7f
Migrate server-sent events HMR connection to WebSocket (#29903)
This replaces the server-sent events HMR connection with a WebSocket connection to prevent hitting browser connection limits, allow sending events back from the browser, and overall better performance. 

This approach sets up the the `upgrade` event listener on the server immediately when created via `next dev` and on the first request using `req.socket.server` when created via a custom server. In a follow-up PR we can push the files changed via the WebSocket as well. 

x-ref: https://github.com/vercel/next.js/issues/10061
x-ref: https://github.com/vercel/next.js/issues/8064
x-ref: https://github.com/vercel/next.js/issues/4495

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-10-15 07:09:54 +00:00
..
dev Migrate server-sent events HMR connection to WebSocket (#29903) 2021-10-15 07:09:54 +00:00
portal Use SWC to compile Next.js core server files (#27167) 2021-07-14 18:12:04 +00:00
head-manager.ts Remove inert font tag in font optimization (#28869) 2021-09-15 11:43:13 -05:00
image.tsx Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
index.tsx Fix ie11 from untranspiled vitals (#29532) 2021-10-01 10:19:36 -05:00
link.tsx Fix: wrong link error message (#28127) 2021-08-15 11:49:21 +00:00
next-dev.js Migrate server-sent events HMR connection to WebSocket (#29903) 2021-10-15 07:09:54 +00:00
next.js Use SWC to compile Next.js core server files (#27167) 2021-07-14 18:12:04 +00:00
normalize-trailing-slash.ts fix basepath trailing slash (#15200) 2020-07-15 23:53:31 +00:00
page-loader.ts Use SWC to compile Next.js core server files (#27167) 2021-07-14 18:12:04 +00:00
performance-relayer.ts Experimental: hook version of reportWebVitals (#28769) 2021-09-24 18:35:33 +00:00
request-idle-callback.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
route-announcer.tsx Use SWC to compile Next.js core server files (#27167) 2021-07-14 18:12:04 +00:00
route-loader.ts allow to reload disposed client pages (#29815) 2021-10-11 20:36:01 +02:00
router.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
script.tsx next/script fix duplicate scripts (#28428) 2021-08-24 11:07:38 -05:00
use-intersection.tsx fix(link): cancel idle callback on unmount (#22072) 2021-02-11 13:51:41 -05:00
vitals.ts Fix ie11 from untranspiled vitals (#29532) 2021-10-01 10:19:36 -05:00
with-router.tsx Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00