Unverified Commit cc27d89b authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

Turn on the adapter route collapses by default (#98218)

`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.
parent 090f1b72
...@@ -507,9 +507,7 @@ export interface ExperimentalConfig { ...@@ -507,9 +507,7 @@ export interface ExperimentalConfig {
* A collapsed entry resolves each request to the same output as the entries * A collapsed entry resolves each request to the same output as the entries
* that it replaces. * that it replaces.
* *
* The default is `false`, so a build keeps one entry per route. * @default true
*
* @default false
*/ */
collapseAdapterRoutes?: boolean collapseAdapterRoutes?: boolean
useSkewCookie?: boolean useSkewCookie?: boolean
...@@ -2279,7 +2277,7 @@ export const defaultConfig = Object.freeze({ ...@@ -2279,7 +2277,7 @@ export const defaultConfig = Object.freeze({
adapterPath: process.env.NEXT_ADAPTER_PATH || undefined, adapterPath: process.env.NEXT_ADAPTER_PATH || undefined,
experimental: { experimental: {
coldCacheBadge: false, coldCacheBadge: false,
collapseAdapterRoutes: false, collapseAdapterRoutes: true,
devValidationWorker: true, devValidationWorker: true,
useSkewCookie: false, useSkewCookie: false,
cssChunking: true, cssChunking: true,
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
*/ */
const nextConfig = { const nextConfig = {
cacheComponents: true, cacheComponents: true,
// The option is off by default. These snapshots pin the collapsed route
// table, so the fixture enables it.
experimental: { collapseAdapterRoutes: true },
// A build ID that reaches an entry changes the snapshot on every run. A // A build ID that reaches an entry changes the snapshot on every run. A
// fixed build ID keeps the snapshot independent of the run. // fixed build ID keeps the snapshot independent of the run.
generateBuildId: () => 'test-build-id', generateBuildId: () => 'test-build-id',
......
...@@ -7,9 +7,6 @@ const nextConfig = { ...@@ -7,9 +7,6 @@ const nextConfig = {
// that variable overrides a config that omits the field. An omitted field // that variable overrides a config that omits the field. An omitted field
// would let that matrix turn Cache Components on for this fixture. // would let that matrix turn Cache Components on for this fixture.
cacheComponents: false, cacheComponents: false,
// The option is off by default. These snapshots pin the collapsed route
// table, so the fixture enables it.
experimental: { collapseAdapterRoutes: true },
// The source regex of a pages router data route holds the build ID. A fixed // The source regex of a pages router data route holds the build ID. A fixed
// build ID keeps the snapshot independent of the run. // build ID keeps the snapshot independent of the run.
generateBuildId: () => 'test-build-id', generateBuildId: () => 'test-build-id',
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
*/ */
const nextConfig = { const nextConfig = {
cacheComponents: true, cacheComponents: true,
// The option is off by default. These snapshots pin the collapsed route
// table, so the fixture enables it.
experimental: { collapseAdapterRoutes: true },
// A build ID that reaches an entry changes the snapshot on every run. A fixed // A build ID that reaches an entry changes the snapshot on every run. A fixed
// build ID keeps the snapshot independent of the run. // build ID keeps the snapshot independent of the run.
generateBuildId: () => 'test-build-id', generateBuildId: () => 'test-build-id',
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
*/ */
const nextConfig = { const nextConfig = {
cacheComponents: true, cacheComponents: true,
// The option is off by default. These snapshots pin the collapsed route
// table, so the fixture enables it.
experimental: { collapseAdapterRoutes: true },
// A build ID that reaches an entry changes the snapshot on every run. A fixed // A build ID that reaches an entry changes the snapshot on every run. A fixed
// build ID keeps the snapshot independent of the run. // build ID keeps the snapshot independent of the run.
generateBuildId: () => 'test-build-id', generateBuildId: () => 'test-build-id',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment