rsnext/packages/next/server
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
lib Migrate server-sent events HMR connection to WebSocket (#29903) 2021-10-15 07:09:54 +00:00
api-utils.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
config-shared.ts Enable esmExternals by default (#29878) 2021-10-13 21:11:52 +00:00
config-utils.ts Remove webpack 4 support (#29660) 2021-10-06 17:40:01 +02:00
config.ts Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
crypto-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
denormalize-page-path.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
font-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
get-page-files.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
get-route-from-entrypoint.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
htmlescape.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
image-config.ts Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
image-optimizer.ts Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
incremental-cache.ts Fix revalidate for initial notFound: true paths (#28097) 2021-08-14 13:11:40 +00:00
load-components.ts Parallelize requirePage when loading components (#29494) 2021-09-29 14:42:35 +00:00
next-server.ts Avoid TypeError when comparing path param (#29821) 2021-10-13 04:56:38 +00:00
next.ts Use SWC to compile Next.js core server files (#27167) 2021-07-14 18:12:04 +00:00
node-polyfill-fetch.js Add next.config.js option to override default keepAlive (#27709) 2021-08-03 00:38:42 +00:00
normalize-page-path.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
optimize-amp.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
render-result.ts Use Writable instead of Observable (#29007) 2021-09-11 00:17:56 +00:00
render.tsx Refactor Document to prep for classic streaming (#29834) 2021-10-13 17:07:18 -05:00
require.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
response-cache.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
router.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
send-payload.ts Simplify RenderResult (#28900) 2021-09-08 16:56:31 +00:00
serve-static.ts Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
utils.ts Add crawler blocking for fallback: true (#29121) 2021-09-16 11:01:28 -05:00