rsnext/packages/next/server
Gerald Monaco 707afe1d4d
Add RenderResult (#27319)
Adds `RenderResult`, replacing the `string` that `renderToHTML` used to return, with an `Observable`-like API that callers can use to subscribe and get a callback when chunks are available to flush, etc.

This is the last architectural change needed for streaming. There are, however, other things currently standing in the way of streaming. For example, it is common to mutate `res` in `getServerSideProps` to do routing work, or write headers, before fetching page data. This pattern effectively nullifies any advantages of streaming. I may do a follow-up PR that adds an experimental alternative for applications not using React 18, but the main purpose for this support is for Suspense and Server Components.

For that reason, there's no actual streaming here yet: instead we just flush a single chunk. A follow-up PR will add support for streaming suspense boundaries in React 18.
2021-07-27 19:18:21 +00:00
..
dev Allow enabling worker threads on dev server (#23027) 2021-07-20 19:12:57 -05:00
lib Workaround for Node.js 16+ on Apple Silicon M1 (#27031) 2021-07-12 17:05:41 +00:00
api-utils.ts Refactor i18n checks on request handling (#27328) 2021-07-21 16:12:33 +00:00
config-shared.ts Update eslint doc comment (#27478) 2021-07-25 13:48:46 +00:00
config-utils-worker.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
config-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
config.ts Add config check for invalid duplicate locale domains (#27451) 2021-07-23 17:16:14 -05: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 minimumCacheTTL config for Image Optimization (#27200) 2021-07-15 19:55:12 +00:00
image-optimizer.ts Fix typo in error message (#27438) 2021-07-23 14:07:09 +00:00
incremental-cache.ts Add configuration for ISR Memory Cache Size (#21535) (#27337) 2021-07-21 17:39:38 +00:00
load-components.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
next-server.ts Add RenderResult (#27319) 2021-07-27 19:18:21 +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 keepAlive to node-fetch polyfill (#27376) 2021-07-22 14:34:33 +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.tsx Add RenderResult (#27319) 2021-07-27 19:18:21 +00:00
require.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
response-cache.ts Add RenderResult (#27319) 2021-07-27 19:18:21 +00:00
router.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
send-payload.ts Add RenderResult (#27319) 2021-07-27 19:18:21 +00:00
serve-static.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
utils.ts Add RenderResult (#27319) 2021-07-27 19:18:21 +00:00