Unverified Commit b301d3cf authored by Andrew Clark's avatar Andrew Clark Committed by GitHub

Enable prefetchInlining by default (#92863)

Flips the `experimental.prefetchInlining` default from `false` to
`true`. This is the first step toward removing the flag entirely.

Tests that explicitly set `prefetchInlining: true` have been cleaned up
since they now match the default. Any CI failures from this PR will be
addressed in follow-up PRs by temporarily opting out individual tests
with `prefetchInlining: false` until they are migrated.

<!-- NEXT_JS_LLM_PR -->
parent ce33784b
...@@ -1843,7 +1843,7 @@ export const defaultConfig = Object.freeze({ ...@@ -1843,7 +1843,7 @@ export const defaultConfig = Object.freeze({
useOffline: false, useOffline: false,
unstableIO: false, unstableIO: false,
varyParams: false, varyParams: false,
prefetchInlining: false, prefetchInlining: true,
preloadEntriesOnStart: true, preloadEntriesOnStart: true,
clientRouterFilter: true, clientRouterFilter: true,
clientRouterFilterRedirects: false, clientRouterFilterRedirects: false,
......
...@@ -3,6 +3,9 @@ const nextConfig = { ...@@ -3,6 +3,9 @@ const nextConfig = {
output: 'export', output: 'export',
trailingSlash: true, trailingSlash: true,
// distDir: '.next-custom', // distDir: '.next-custom',
experimental: {
prefetchInlining: false,
},
} }
module.exports = nextConfig module.exports = nextConfig
...@@ -3,6 +3,7 @@ import type { NextConfig } from 'next' ...@@ -3,6 +3,7 @@ import type { NextConfig } from 'next'
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
productionBrowserSourceMaps: true, productionBrowserSourceMaps: true,
experimental: { experimental: {
prefetchInlining: false,
serverSourceMaps: true, serverSourceMaps: true,
}, },
} }
......
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
module.exports = { module.exports = {
experimental: {
prefetchInlining: false,
},
logging: { logging: {
fetches: {}, fetches: {},
}, },
......
...@@ -7,6 +7,7 @@ const nextConfig = { ...@@ -7,6 +7,7 @@ const nextConfig = {
// Enable the testing API in production builds for these tests // Enable the testing API in production builds for these tests
exposeTestingApiInProductionBuild: true, exposeTestingApiInProductionBuild: true,
instantNavigationDevToolsToggle: true, instantNavigationDevToolsToggle: true,
prefetchInlining: false,
}, },
} }
......
...@@ -6,6 +6,7 @@ const nextConfig = { ...@@ -6,6 +6,7 @@ const nextConfig = {
experimental: { experimental: {
exposeTestingApiInProductionBuild: true, exposeTestingApiInProductionBuild: true,
instantNavigationDevToolsToggle: true, instantNavigationDevToolsToggle: true,
prefetchInlining: false,
}, },
} }
......
...@@ -5,6 +5,7 @@ const nextConfig: NextConfig = { ...@@ -5,6 +5,7 @@ const nextConfig: NextConfig = {
productionBrowserSourceMaps: true, productionBrowserSourceMaps: true,
experimental: { experimental: {
cachedNavigations: true, cachedNavigations: true,
prefetchInlining: false,
exposeTestingApiInProductionBuild: true, exposeTestingApiInProductionBuild: true,
instantNavigationDevToolsToggle: true, instantNavigationDevToolsToggle: true,
optimisticRouting: true, optimisticRouting: true,
......
...@@ -5,6 +5,7 @@ const nextConfig = { ...@@ -5,6 +5,7 @@ const nextConfig = {
cacheComponents: true, cacheComponents: true,
experimental: { experimental: {
dynamicOnHover: true, dynamicOnHover: true,
prefetchInlining: false,
}, },
} }
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
const nextConfig = { const nextConfig = {
cacheComponents: true, cacheComponents: true,
productionBrowserSourceMaps: true, productionBrowserSourceMaps: true,
experimental: {
prefetchInlining: false,
},
} }
module.exports = nextConfig module.exports = nextConfig
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
*/ */
const nextConfig = { const nextConfig = {
cacheComponents: true, cacheComponents: true,
experimental: {
prefetchInlining: false,
},
} }
module.exports = nextConfig module.exports = nextConfig
...@@ -12,6 +12,7 @@ const nextConfig = { ...@@ -12,6 +12,7 @@ const nextConfig = {
// //
// Once the client cache writes segment data during navigations more // Once the client cache writes segment data during navigations more
// broadly, this test could be rewritten without this config. // broadly, this test could be rewritten without this config.
prefetchInlining: false,
staleTimes: { staleTimes: {
dynamic: 180, dynamic: 180,
}, },
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
const nextConfig = { const nextConfig = {
cacheComponents: true, cacheComponents: true,
experimental: { experimental: {
prefetchInlining: true,
optimisticRouting: true, optimisticRouting: true,
}, },
} }
......
...@@ -12,6 +12,7 @@ const nextConfig = { ...@@ -12,6 +12,7 @@ const nextConfig = {
}, },
experimental: { experimental: {
optimisticRouting: true, optimisticRouting: true,
prefetchInlining: false,
varyParams: true, varyParams: true,
}, },
} }
......
...@@ -5,6 +5,7 @@ const nextConfig = { ...@@ -5,6 +5,7 @@ const nextConfig = {
cacheComponents: true, cacheComponents: true,
experimental: { experimental: {
optimisticRouting: true, optimisticRouting: true,
prefetchInlining: false,
varyParams: true, varyParams: true,
}, },
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
const nextConfig = { const nextConfig = {
experimental: { experimental: {
prefetchInlining: false,
useCache: true, useCache: true,
}, },
rewrites: async () => { rewrites: async () => {
......
...@@ -8,7 +8,6 @@ const nextConfig = { ...@@ -8,7 +8,6 @@ const nextConfig = {
varyParams: true, varyParams: true,
optimisticRouting: true, optimisticRouting: true,
cachedNavigations: true, cachedNavigations: true,
prefetchInlining: true,
}, },
} }
......
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