Preload chunks for next/dynamic in suspense mode (#37245)
When using `next/dynamic` with `suspense: true`, the API will opt into `React.lazy` with react 18. But previously it doesn't preload the dynamic chunks. This pr will include the chunks into initial html for faster hydration instead of loading the chunk until the script is executed. This makes `next/dynamic` has a significant difference from `React.lazy` api x-ref: https://github.com/vercel/next.js/issues/37197#issuecomment-1138496911 x-ref: https://github.com/vercel/next.js/pull/37244
Showing
File moved
Please
register
or
sign in
to comment