Skip to content

Commit

Permalink
Use NextConfigComplete type
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Mar 11, 2024
1 parent 4eac0c9 commit c1684af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/next/src/build/webpack/plugins/define-env-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type {
import type { MiddlewareMatcher } from '../../analysis/get-page-static-info'
import { webpack } from 'next/dist/compiled/webpack/webpack'
import { needsExperimentalReact } from '../../../lib/needs-experimental-react'
import type { ImageConfigComplete } from '../../../shared/lib/image-config'

function errorIfEnvConflicted(config: NextConfigComplete, key: string) {
const isPrivateKey = /^(?:NODE_.+)|^(?:__.+)$/i.test(key)
Expand Down Expand Up @@ -50,7 +49,7 @@ interface DefineEnv {
| undefined
| MiddlewareMatcher[]
| BloomFilter
| Partial<ImageConfigComplete>
| Partial<NextConfigComplete['images']>
| I18NDomains
}

Expand Down Expand Up @@ -107,7 +106,7 @@ function serializeDefineEnv(defineEnv: DefineEnv): SerializedDefineEnv {
function getImageConfig(
config: NextConfigComplete,
dev: boolean
): { 'process.env.__NEXT_IMAGE_OPTS': Partial<ImageConfigComplete> } {
): { 'process.env.__NEXT_IMAGE_OPTS': Partial<NextConfigComplete['images']> } {
return {
'process.env.__NEXT_IMAGE_OPTS': {
deviceSizes: config.images.deviceSizes,
Expand Down

0 comments on commit c1684af

Please sign in to comment.