payload icon indicating copy to clipboard operation
payload copied to clipboard

chore(template): update with-cloudflare-d1 template to Next.js 16

Open BlueXTX opened this issue 7 months ago • 2 comments

Documentation Issue

The with-cloudflare-d1 template is outdated — it still uses Next.js 15 while the with-postgres template has already been updated to Next.js 16.

Additional Details

What is outdated

The with-cloudflare-d1 template (templates/with-cloudflare-d1/package.json) currently pins the following versions:

  • next: 15.4.11
  • eslint-config-next: 15.4.11
  • react / react-dom: 19.2.1
  • @types/react: 19.2.9

Meanwhile, the with-postgres template (templates/with-postgres/package.json) has already been updated to:

  • next: 16.2.3
  • eslint-config-next: 16.2.3
  • react / react-dom: 19.2.4
  • @types/react: 19.2.14

Why this should be updated

Both of the dependencies that gate this update are already fully compatible with Next.js 16:

  • @opennextjs/cloudflare — according to the official OpenNext docs, all minor and patch versions of Next.js 16 are supported.
  • Payload CMS itself — Next.js 16 support was merged in PR #14456 on January 20, 2026, and shipped in v3.73.0. The current template already uses 3.82.1, so the support is present.

In PR #14456, @AlessioGr explicitly noted:

"Templates will be updated in a separate PR once Next.js 16.2.0 is released."

Next.js 16.2.0 has since been released, but the with-cloudflare-d1 template has not received the corresponding update, while with-postgres has.

Impact

Users who bootstrap a new project from the with-cloudflare-d1 template start with an outdated Next.js version, missing improvements such as stable Turbopack builds (which, as noted in the PR comments, reduced build times from 8+ minutes to ~22 seconds for some users), the stable React Compiler integration, and other Next.js 16 improvements — even though all the infrastructure to support Next.js 16 is already in place.

Suggested fix

Align with-cloudflare-d1 with with-postgres by bumping:

  • next → 16.2.3 (or latest 16.x)
  • eslint-config-next → same version as next
  • react / react-dom → 19.2.4
  • @types/react → 19.2.14

BlueXTX avatar Apr 28 '26 21:04 BlueXTX

The template has been updated to Next.js 16 on 3.x. We'll make sure it's good to go for 4.0 prior to release.

nathanlentz avatar Aug 03 '26 17:08 nathanlentz

#17577

nathanlentz avatar Aug 03 '26 17:08 nathanlentz