rsnext/packages/next/build/webpack
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
..
config Updated the Error message describing the alternative and added styles… (#14652) 2021-07-25 04:53:33 +00:00
loaders Add RenderResult (#27319) 2021-07-27 19:18:21 +00:00
plugins Provide Next.js postcss version to cssnano-simple (#26952) 2021-07-08 13:10:43 +02:00
require-hook.ts Ensure externals are correct for mini-css-extract-plugin (#25340) 2021-05-23 13:15:58 +02:00