diff --git a/packages/next/build/webpack/config/index.ts b/packages/next/build/webpack/config/index.ts index e250bfee11c1e..033b4c93e9b9c 100644 --- a/packages/next/build/webpack/config/index.ts +++ b/packages/next/build/webpack/config/index.ts @@ -1,5 +1,5 @@ import { webpack } from 'next/dist/compiled/webpack/webpack' -import { NextConfig } from '../../../server/config' +import { NextConfigComplete } from '../../../server/config-shared' import { base } from './blocks/base' import { css } from './blocks/css' import { ConfigurationContext, pipe } from './utils' @@ -24,7 +24,7 @@ export async function build( assetPrefix: string sassOptions: any productionBrowserSourceMaps: boolean - future: NextConfig['future'] + future: NextConfigComplete['future'] isCraCompat?: boolean } ): Promise { diff --git a/packages/next/build/webpack/config/utils.ts b/packages/next/build/webpack/config/utils.ts index d61df5dc73348..3076195f9c238 100644 --- a/packages/next/build/webpack/config/utils.ts +++ b/packages/next/build/webpack/config/utils.ts @@ -1,5 +1,5 @@ import { webpack } from 'next/dist/compiled/webpack/webpack' -import { NextConfig } from '../../../server/config' +import { NextConfigComplete } from '../../../server/config-shared' export type ConfigurationContext = { rootDirectory: string @@ -16,7 +16,7 @@ export type ConfigurationContext = { sassOptions: any productionBrowserSourceMaps: boolean - future: NextConfig['future'] + future: NextConfigComplete['future'] isCraCompat?: boolean } diff --git a/packages/next/export/worker.ts b/packages/next/export/worker.ts index e061f6107de77..b8aec82abdf98 100644 --- a/packages/next/export/worker.ts +++ b/packages/next/export/worker.ts @@ -46,7 +46,7 @@ interface ExportPageInput { pagesDataDir: string renderOpts: RenderOpts buildExport?: boolean - serverRuntimeConfig: string + serverRuntimeConfig: { [key: string]: any } subFolders?: boolean serverless: boolean optimizeFonts: boolean diff --git a/packages/next/server/config-shared.ts b/packages/next/server/config-shared.ts index c47bad548827a..22170d28bb40e 100644 --- a/packages/next/server/config-shared.ts +++ b/packages/next/server/config-shared.ts @@ -62,15 +62,18 @@ export type NextConfig = { [key: string]: any } & { sassOptions?: { [key: string]: any } productionBrowserSourceMaps?: boolean optimizeFonts?: boolean + reactStrictMode?: boolean + publicRuntimeConfig?: { [key: string]: any } + serverRuntimeConfig?: { [key: string]: any } - future: { + future?: { /** * @deprecated this options was moved to the top level */ webpack5?: false strictPostcssConfiguration?: boolean } - experimental: { + experimental?: { cpus?: number plugins?: boolean profiling?: boolean