rsnext/packages
Jiachi Liu b4130cb07a
Preload all chunks for next/dynamic in SSR (#65486)
### What

Follow up for #64294 where we could preload all the JS and CSS chunks
for `next/dynamic` component.

* Rename `preload-css` component to `preload-chunks` and remove the
filter for css chunks
* Preload JS chunks with `defer`

### Why

Preloading all the async chunks of `next/dynamic` can make rendering
more efficiently when combined with the initial chunks. Since those
chunks are splitted on client but still essential for the page

#### After vs Before

We can see the waterfall starts much earlier for the dynamic chunk
(881.8a0e88...js)

<img width="500"
src="https://github.com/vercel/next.js/assets/4800338/9bab2c32-37c3-4c7a-93e2-3aa43b2ec7c8">
<img width="500"
src="https://github.com/vercel/next.js/assets/4800338/0fba7499-bb69-41c4-ab72-e9952f3d7f68">
2024-05-08 19:30:42 +02:00
..
create-next-app v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
eslint-config-next v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
eslint-plugin-next v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
font v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next Preload all chunks for next/dynamic in SSR (#65486) 2024-05-08 19:30:42 +02:00
next-bundle-analyzer v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next-codemod v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next-env v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next-mdx v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next-plugin-storybook v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next-polyfill-module v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next-polyfill-nomodule v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
next-swc add page name to crashes (#65504) 2024-05-08 17:31:45 +02:00
react-refresh-utils v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
third-parties v14.3.0-canary.49 2024-05-08 08:43:30 +00:00