Repository navigation
Turn off the adapter route collapses by default - #97774
Merged
unstubbable merged 1 commit intoAug 24, 2026
Merged
unstubbable merged 1 commit into
unstubbable merged 1 commit into
Conversation
`experimental.collapseAdapterRoutes` now defaults to `false`, so a build keeps one entry per route unless the project opts in. The changes below it in this stack stay as they are, and a project that sets the option to `true` gets the route table that they produce. The default starts off so that we can dogfood the behavior on selected apps before every build gets it. The default moves back to `true` once enough apps have run with it. The four fixtures under `test/production/app-dir/adapter-dynamic-routes` set the option, because their snapshots pin the collapsed table. A build of the Cache Components fixture without the option emits the 27 entries that the first commit in this stack recorded, which is what the option now turns off.
Contributor
Stats from current PR🔴 1 regression
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (3 files)Files with changes:
View diffspages-api-tu..ntime.dev.jsDiff too large to display pages-turbo...ntime.dev.jsDiff too large to display server.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: a0ad33c |
Contributor
Tests PassedCommit: a0ad33c |
unstubbable
marked this pull request as ready for review
August 24, 2026 07:58
mischnic
approved these changes
Aug 24, 2026
mischnic
left a comment
Member
There was a problem hiding this comment.
would ideally have been like this from the start, but the stack is quite long already indeed
|
Great work on this. @unstubbable We recently investigated a React OOM issue tied to a Next.js memory leak, and the behavior was independently validated. React PR: react/react#37289 Next.js discussion: #84648 Would appreciate your thoughts on the investigation and approach. |
unstubbable
added a commit
that referenced
this pull request
Sep 4, 2026
`experimental.collapseAdapterRoutes` now defaults to `true`, so a build serves several dynamic routes from one entry in the route table that it passes to an adapter. The default started off in #97774 so that the behavior could reach projects one at a time. We have tested this successfully internally, so the default moves back. The option stays in place, so a build that hits a regression can set it to `false` and get the table that a build emitted before the collapses. The four fixtures under `test/production/app-dir/adapter-dynamic-routes` no longer set the option, because the default now gives them the collapsed table that their snapshots record. The snapshots themselves do not change, since the new default produces what the explicit option produced. A full deploy test run with the flag on by default was already done as part of #97738.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
experimental.collapseAdapterRoutesnow defaults tofalse, so a build keeps one entry per route unless the project opts in. The changes below it in this stack stay as they are, and a project that sets the option totruegets the route table that they produce.The default starts off so that we can dogfood the behavior on selected apps before every build gets it. The default moves back to
trueonce enough apps have run with it.The four fixtures under
test/production/app-dir/adapter-dynamic-routesset the option, because their snapshots pin the collapsed table. A build of the Cache Components fixture without the option emits the 27 entries that the first commit in this stack recorded, which is what the option now turns off.