51f0359222
Cleans up the code of the middleware SSR loader and the web server. Currently the page components and render options are provided to the server via `globalThis` which is not ideal. Instead we can inject `extendRenderOpts` and `loadComponent` to the web server. Since this is the the minimal mode and we'll need to handle `?flight` requests, we update the server render opts upon `updateRenderOpts` (In the future this should be changed to be passed to `requestHandler` to avoid race conditions). Currently, we can't fully get rid of the `__server_context` global as we call `getBuildId` in the base server constructor. ## 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 by running `yarn lint` |
||
---|---|---|
.. | ||
css-loader | ||
next-middleware-ssr-loader | ||
next-serverless-loader | ||
next-style-loader | ||
postcss-loader | ||
resolve-url-loader | ||
error-loader.ts | ||
next-client-pages-loader.ts | ||
next-flight-client-loader.ts | ||
next-flight-server-loader.ts | ||
next-image-loader.js | ||
next-middleware-loader.ts | ||
next-swc-loader.js | ||
noop-loader.ts |