rsnext/packages/next
Shu Ding 0307ba0d1d
Optimize the SSR middleware runtime size (#30906)
By conditionally importing `react-dom/server` under the web runtime and reusing `renderToReadableStream` instead of `renderToStaticMarkup`, we can get rid of the legacy browser React DOM server from the runtime. ~Furthermore we can make the build target `es6` for the SSR middleware, and make some code paths tree-shakable (done in another PR).~

Together this makes the runtime ~32kb smaller.

## 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`
2021-11-05 21:51:10 +00:00
..
bin Use import() to load next.config.js (#29935) 2021-10-16 14:22:42 +02:00
build Optimize the SSR middleware runtime size (#30906) 2021-11-05 21:51:10 +00:00
bundles Update loader-utils (#30743) 2021-11-02 16:13:15 +01:00
cli Improve error message for importing native Node APIs in the edge runtime (#30696) 2021-11-01 11:40:21 +00:00
client Account for assetPrefix when initializing HMR connection (#30632) 2021-11-04 10:34:37 +01:00
compiled upgrade webpack-sources (#30944) 2021-11-04 11:33:02 +00:00
export Enable shared worker pool by default (#30110) 2021-10-20 14:06:43 -05:00
image-types Add support for AVIF to next/image (#29683) 2021-10-11 23:17:47 +00:00
lib update tsconfig correctly when compilerOptions is not set yet (#30355) 2021-10-27 04:11:07 +00:00
native Chore/rust workflow (#30577) 2021-10-29 13:56:56 -05:00
pages Use absolute document and app paths for the middleware SSR loader (#30963) 2021-11-04 14:10:07 -05:00
server Optimize the SSR middleware runtime size (#30906) 2021-11-05 21:51:10 +00:00
shared/lib Optimize other fonts provide by Google (#30554) 2021-11-02 10:24:55 +01:00
telemetry add warning to update featureName in FEATURE_USAGE backend (#30283) 2021-10-28 11:16:42 -05:00
trace Fix version in trace (#30982) 2021-11-04 20:56:30 +00:00
types Fix invalid character in next/image header "Content-Disposition" (#30287) 2021-11-01 19:23:24 -04:00
amp.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
amp.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
app.d.ts
app.js
babel.d.ts
babel.js
client.d.ts
client.js
config.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
config.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
data.d.ts
data.js
data.sqlite Fix export worker threads options (#25063) 2021-05-14 12:50:29 +02:00
document.d.ts
document.js
dynamic.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
dynamic.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
error.d.ts
error.js
head.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
head.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
image.d.ts Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
image.js Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
license.md Update license year for all packages 2021-01-11 11:12:19 +01:00
link.d.ts
link.js
package.json v12.0.3 2021-11-05 19:04:04 +01:00
README.md docs(readme.md): add good first issue section to readme (#25085) 2021-05-18 16:10:01 -05:00
router.d.ts
router.js
script.d.ts Remove experimental tag from Script component (#25435) 2021-06-03 13:56:50 +02:00
script.js Remove experimental tag from Script component (#25435) 2021-06-03 13:56:50 +02:00
server.d.ts Implement Middleware RFC (#30081) 2021-10-20 17:52:11 +00:00
server.js Implement Middleware RFC (#30081) 2021-10-20 17:52:11 +00:00
taskfile-ncc.js Migrate server-sent events HMR connection to WebSocket (#29903) 2021-10-15 07:09:54 +00:00
taskfile-swc.js Use import() to load next.config.js (#29935) 2021-10-16 14:22:42 +02:00
taskfile.js Use absolute document and app paths for the middleware SSR loader (#30963) 2021-11-04 14:10:07 -05:00
tsconfig.json Revert incremental config to fix missing types (#30644) 2021-10-29 23:16:11 -05:00
vitals.d.ts Fix ie11 from untranspiled vitals (#29532) 2021-10-01 10:19:36 -05:00
vitals.js Fix ie11 from untranspiled vitals (#29532) 2021-10-01 10:19:36 -05:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Authors