@@ -6,7 +6,7 @@ import type { NextConfigComplete } from 'next/dist/server/config-shared'
66import { join , dirname , relative } from 'pathe'
77import slash from 'slash'
88
9- import { HANDLER_FUNCTION_NAME , ODB_FUNCTION_NAME } from '../constants'
9+ import { HANDLER_FUNCTION_NAME , IMAGE_FUNCTION_NAME , ODB_FUNCTION_NAME } from '../constants'
1010
1111import type { RoutesManifest } from './types'
1212import { escapeStringRegexp } from './utils'
@@ -107,18 +107,16 @@ export const configureHandlerFunctions = async ({
107107 const files = config . files || [ ]
108108 const cssFilesToInclude = files . filter ( ( f ) => f . startsWith ( `${ publish } /static/css/` ) )
109109
110- /* eslint-disable no-underscore-dangle */
111110 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'
114113 }
115114
116115 // If the user has manually added the module to included_files, then don't exclude it
117116 const excludedModules = DEFAULT_EXCLUDED_MODULES . filter (
118117 ( moduleName ) => ! hasManuallyAddedModule ( { netlifyConfig, moduleName } ) ,
119118 )
120119
121- /* eslint-enable no-underscore-dangle */
122120 ; [ HANDLER_FUNCTION_NAME , ODB_FUNCTION_NAME , '_api_*' ] . forEach ( ( functionName ) => {
123121 netlifyConfig . functions [ functionName ] ||= { included_files : [ ] , external_node_modules : [ ] }
124122 netlifyConfig . functions [ functionName ] . node_bundler = 'nft'
0 commit comments