-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: next.js 16 support #14456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: next.js 16 support #14456
Conversation
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
The `DraggableSortable` (rendered in the list view when sorting columns) was unmounted and re-mounted multiple times when loading a page. This happened because the `useMemo` we used in `PillSelector` was returning a new function reference on each recomputation => every time it ran, `DraggableSortable` remounted. This means the ID generated by `useId` in `DraggableSortable` changed multiple times during load. This made the hydration issues in my [Next.js 16 PR](#14456) more difficult to debug. This PR removes the unnecessary re-mounting, improving performance and potentially reducing the risk of hydration issues.
This reverts commit 00702a2.
|
Any news on this one? |
vercel/next.js#84029 has unfortunately become a blocker for Next.js 16 support, and we're waiting for that issue to be resolved. I've updated the PR description |
|
Thank you @AlessioGr for your hard work, hopefully Vercel can fix the issue soon! |
|
Is there any progress? |
Let the man cook! |
|
happy new years |
…ackages from 3.69.0 to 3.58.5 Downgraiding was necessary to avoid error with new payload widget feature CollectionCards Sources: - payloadcms/payload#15010 - payloadcms/payload#14456
|
Progress: managed to create a minimal reproduction for the hydration issues here: https://github.com/AlessioGr/repro-hydration Should make it easier for the React/Next.js team to resolve this. |
|
Does this PR fix the problem? |
It does not, unfortunately |
This PR updates this monorepo and all templates to use Next.js 16. Running our test suites against Next.js 16 is required to guarantee support.
Individual, Next.js 16-related fixes, will be made in separate, smaller PRs (listed below).
Current Status / Known Issues
You can use Next.js 16 with Payload, as long as you're using the latest Payload version and Next.js 16.1.0+ or the latest Next.js canary.
What to expect when using the latest Payload version and Next.js canary:
When is Next.js 16 support ready? What are we waiting on?
Before we can guarantee full support for Next.js 16, one remaining issue must be resolved by the Next.js / React team:
The following Next.js issues have been resolved and are no longer blockers:
Turbopack HMR stability - vercel/next.js#85883Fixed in Next.js canaryCurrently breaks when a live-preview–enabled page is open (related Payload issue).
The Next.js team is actively working on a fix: PR #86239.
Turbopack Build support: PR #86375.Fixed in Next.js canaryList of Next.js 16-related PRs that were extracted from this branch