chore: upgrade storefront to Next.js 16#16
Open
deszczak wants to merge 2 commits into
Open
Conversation
…t components for Next.js 16 compatibility
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. |
Author
|
It's okay :) I'm glad I could contribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR upgrades
apps/storefrontfrom Next.js 15 to Next.js 16.2.6 with React 19.2.6.Changes
Async Request APIs
All page, layout, and
generateMetadatafunctions now typeparamsandsearchParamsasPromise<{…}>and resolve them viaawait props.params/await props.searchParams, as required by Next.js 16.Middleware → Proxy
middleware.tsrenamed toproxy.ts.cacheComponentsEnabled at the top level of
next.config.js(replaces the discontinuedexperimental.dynamicIOflag).Caching API
Updated
revalidateTagwith its new requiredcacheLifeargument and changed it to the newupdateTagin 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.tsxfor the@loginslot to satisfy the new parallel-route default slot requirement.ESLint
lintscript updated fromnext linttoeslint ..Dependencies
next16.2.6,react/react-dom19.2.6eslint-config-next16.2.6typescript^5.9.3@types/react19.2.14,@types/react-dom19.2.3 (via pnpm overrides)Testing
pnpm dev)./, product pages, categories, cart, checkout, account, order transfer) load correctly.