Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NextConfig type to not require experimental or future fields #25517

Merged
merged 3 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/next/build/webpack/config/index.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -24,7 +24,7 @@ export async function build(
assetPrefix: string
sassOptions: any
productionBrowserSourceMaps: boolean
future: NextConfig['future']
future: NextConfigComplete['future']
isCraCompat?: boolean
}
): Promise<webpack.Configuration> {
Expand Down
4 changes: 2 additions & 2 deletions packages/next/build/webpack/config/utils.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,7 +16,7 @@ export type ConfigurationContext = {
sassOptions: any
productionBrowserSourceMaps: boolean

future: NextConfig['future']
future: NextConfigComplete['future']

isCraCompat?: boolean
}
Expand Down
2 changes: 1 addition & 1 deletion packages/next/export/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface ExportPageInput {
pagesDataDir: string
renderOpts: RenderOpts
buildExport?: boolean
serverRuntimeConfig: string
serverRuntimeConfig: { [key: string]: any }
subFolders?: boolean
serverless: boolean
optimizeFonts: boolean
Expand Down
7 changes: 5 additions & 2 deletions packages/next/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down