Skip to content

chore: upgrade storefront to Next.js 16#16

Open
deszczak wants to merge 2 commits into
medusajs:mainfrom
deszczak:update-next-16
Open

chore: upgrade storefront to Next.js 16#16
deszczak wants to merge 2 commits into
medusajs:mainfrom
deszczak:update-next-16

Conversation

@deszczak

Copy link
Copy Markdown

This PR upgrades apps/storefront from Next.js 15 to Next.js 16.2.6 with React 19.2.6.

Changes

Async Request APIs
All page, layout, and generateMetadata functions now type params and searchParams as Promise<{…}> and resolve them via await props.params / await props.searchParams, as required by Next.js 16.

Middleware → Proxy
middleware.ts renamed to proxy.ts.

Starting with Next.js 16, Middleware is now called Proxy to better reflect its purpose

cacheComponents
Enabled at the top level of next.config.js (replaces the discontinued experimental.dynamicIO flag).

Caching API
Updated revalidateTag with its new required cacheLife argument and changed it to the new updateTag in a few places to support read-your-own-writes semantics in Server Actions.

Suspense boundaries
Dynamic server components in the main layout (CustomerBanner, ShippingNudge) have been wrapped in <Suspense> as required by the Cache Components model.

Parallel route default
Added default.tsx for the @login slot to satisfy the new parallel-route default slot requirement.

ESLint
lint script updated from next lint to eslint ..

Dependencies

  • next 16.2.6, react / react-dom 19.2.6
  • eslint-config-next 16.2.6
  • typescript ^5.9.3
  • @types/react 19.2.14, @types/react-dom 19.2.3 (via pnpm overrides)

Testing

  • Dev server starts without compilation errors (pnpm dev).
  • All storefront routes (/, product pages, categories, cart, checkout, account, order transfer) load correctly.

@shahednasser

Copy link
Copy Markdown
Member

Hi @deszczak , thank you for your work! Unfortunately, we can't accept this yet, as Medusa Cloud doesn't support proxy instead of middlewares.

@deszczak

Copy link
Copy Markdown
Author

It's okay :) I'm glad I could contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants