@@ -6,7 +6,7 @@ import type { NextConfigComplete } from 'next/dist/server/config-shared'
6
6
import { join , dirname , relative } from 'pathe'
7
7
import slash from 'slash'
8
8
9
- import { HANDLER_FUNCTION_NAME , ODB_FUNCTION_NAME } from '../constants'
9
+ import { HANDLER_FUNCTION_NAME , IMAGE_FUNCTION_NAME , ODB_FUNCTION_NAME } from '../constants'
10
10
11
11
import type { RoutesManifest } from './types'
12
12
import { escapeStringRegexp } from './utils'
@@ -107,18 +107,16 @@ export const configureHandlerFunctions = async ({
107
107
const files = config . files || [ ]
108
108
const cssFilesToInclude = files . filter ( ( f ) => f . startsWith ( `${ publish } /static/css/` ) )
109
109
110
- /* eslint-disable no-underscore-dangle */
111
110
if ( ! destr ( process . env . DISABLE_IPX ) ) {
112
- netlifyConfig . functions . _ipx ||= { }
113
- netlifyConfig . functions . _ipx . node_bundler = 'nft'
111
+ netlifyConfig . functions [ IMAGE_FUNCTION_NAME ] ||= { }
112
+ netlifyConfig . functions [ IMAGE_FUNCTION_NAME ] . node_bundler = 'nft'
114
113
}
115
114
116
115
// If the user has manually added the module to included_files, then don't exclude it
117
116
const excludedModules = DEFAULT_EXCLUDED_MODULES . filter (
118
117
( moduleName ) => ! hasManuallyAddedModule ( { netlifyConfig, moduleName } ) ,
119
118
)
120
119
121
- /* eslint-enable no-underscore-dangle */
122
120
; [ HANDLER_FUNCTION_NAME , ODB_FUNCTION_NAME , '_api_*' ] . forEach ( ( functionName ) => {
123
121
netlifyConfig . functions [ functionName ] ||= { included_files : [ ] , external_node_modules : [ ] }
124
122
netlifyConfig . functions [ functionName ] . node_bundler = 'nft'
0 commit comments