Pages router: Enable strict next/head
children reconciler by default (#65418)
Closes NEXT-3330
This commit is contained in:
parent
b0ab0fe85f
commit
9084a09741
5 changed files with 4 additions and 8 deletions
|
@ -224,7 +224,7 @@ export function getDefineEnv({
|
|||
...getImageConfig(config, dev),
|
||||
'process.env.__NEXT_ROUTER_BASEPATH': config.basePath,
|
||||
'process.env.__NEXT_STRICT_NEXT_HEAD':
|
||||
config.experimental.strictNextHead ?? false,
|
||||
config.experimental.strictNextHead ?? true,
|
||||
'process.env.__NEXT_HAS_REWRITES': hasRewrites,
|
||||
'process.env.__NEXT_CONFIG_OUTPUT': config.output,
|
||||
'process.env.__NEXT_I18N_SUPPORT': !!config.i18n,
|
||||
|
|
|
@ -416,7 +416,7 @@ export async function exportAppImpl(
|
|||
serverActionsManifest,
|
||||
}
|
||||
: {}),
|
||||
strictNextHead: !!nextConfig.experimental.strictNextHead,
|
||||
strictNextHead: nextConfig.experimental.strictNextHead ?? true,
|
||||
deploymentId: nextConfig.deploymentId,
|
||||
experimental: {
|
||||
isAppPPREnabled: checkIsAppPPREnabled(nextConfig.experimental.ppr),
|
||||
|
|
|
@ -516,7 +516,7 @@ export default abstract class Server<
|
|||
supportsDynamicHTML: true,
|
||||
trailingSlash: this.nextConfig.trailingSlash,
|
||||
deploymentId: this.nextConfig.deploymentId,
|
||||
strictNextHead: !!this.nextConfig.experimental.strictNextHead,
|
||||
strictNextHead: this.nextConfig.experimental.strictNextHead ?? true,
|
||||
poweredByHeader: this.nextConfig.poweredByHeader,
|
||||
canonicalBase: this.nextConfig.amp.canonicalBase || '',
|
||||
buildId: this.buildId,
|
||||
|
|
|
@ -189,6 +189,7 @@ export interface ExperimentalConfig {
|
|||
caseSensitiveRoutes?: boolean
|
||||
appDocumentPreloading?: boolean
|
||||
preloadEntriesOnStart?: boolean
|
||||
/** @default true */
|
||||
strictNextHead?: boolean
|
||||
clientRouterFilter?: boolean
|
||||
clientRouterFilterRedirects?: boolean
|
||||
|
|
|
@ -14,11 +14,6 @@ describe('next/head', () => {
|
|||
pages: new FileRef(join(__dirname, 'app/pages')),
|
||||
components: new FileRef(join(__dirname, 'app/components')),
|
||||
},
|
||||
nextConfig: {
|
||||
experimental: {
|
||||
strictNextHead: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
afterAll(() => next.destroy())
|
||||
|
|
Loading…
Reference in a new issue