build: bump NextJS from to 16 with turbopack enable for web production build boost (#27014)

Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
This commit is contained in:
Bowen Liang
2026-01-21 12:53:29 +08:00
committed by GitHub
parent db4fb06c5f
commit 071bbc6d74
8 changed files with 120 additions and 164 deletions
+2 -3
View File
@@ -1,4 +1,3 @@
import type { UnsafeUnwrappedHeaders } from 'next/headers'
import type { FC } from 'react'
import { headers } from 'next/headers'
import Script from 'next/script'
@@ -26,14 +25,14 @@ const extractNonceFromCSP = (cspHeader: string | null): string | undefined => {
return nonceMatch ? nonceMatch[1] : undefined
}
const GA: FC<IGAProps> = ({
const GA: FC<IGAProps> = async ({
gaType,
}) => {
if (IS_CE_EDITION)
return null
const cspHeader = IS_PROD
? (headers() as unknown as UnsafeUnwrappedHeaders).get('content-security-policy')
? (await headers()).get('content-security-policy')
: null
const nonce = extractNonceFromCSP(cspHeader)