Skip to content

Commit

Permalink
Make next.config.js keys optional
Browse files Browse the repository at this point in the history
  • Loading branch information
PepijnSenders committed May 17, 2021
1 parent 218c611 commit 2b870ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/next/next-server/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export type NextConfig = { [key: string]: any } & {
validator?: string
skipValidation?: boolean
}
turboMode: boolean
turboMode?: boolean
eslint?: boolean
reactRoot: boolean
enableBlurryPlaceholder: boolean
disableOptimizedLoading: boolean
gzipSize: boolean
reactRoot?: boolean
enableBlurryPlaceholder?: boolean
disableOptimizedLoading?: boolean
gzipSize?: boolean
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/next/next-server/server/next-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default class Server {
images: string
fontManifest: FontManifest
optimizeImages: boolean
disableOptimizedLoading: boolean
disableOptimizedLoading?: boolean
optimizeCss: any
locale?: string
locales?: string[]
Expand Down Expand Up @@ -219,7 +219,7 @@ export default class Server {
optimizeImages: !!this.nextConfig.experimental.optimizeImages,
optimizeCss: this.nextConfig.experimental.optimizeCss,
disableOptimizedLoading: this.nextConfig.experimental
.disableOptimizedLoading,
?.disableOptimizedLoading,
domainLocales: this.nextConfig.i18n?.domains,
distDir: this.distDir,
}
Expand Down

0 comments on commit 2b870ad

Please sign in to comment.