Skip to content

Commit

Permalink
Update public NextConfig type
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jul 20, 2021
1 parent d473275 commit 60ea3e0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
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

0 comments on commit 60ea3e0

Please sign in to comment.