@@ -451,28 +451,28 @@ export const writeEdgeFunctions = async ({
451
451
}
452
452
}
453
453
454
-
455
- if ( destr ( process . env . NEXT_FORCE_EDGE_IMAGES ) &&
456
- ! destr ( process . env . NEXT_DISABLE_EDGE_IMAGES ) &&
457
- ! destr ( process . env . DISABLE_IPX )
458
- ) {
459
- usesEdge = true
460
- console . log (
461
- 'Using Netlify Edge Functions for image format detection. Set env var "NEXT_DISABLE_EDGE_IMAGES=true" to disable.' ,
462
- )
463
- const edgeFunctionDir = join ( edgeFunctionRoot , 'ipx' )
464
- await ensureDir ( edgeFunctionDir )
465
- await copyEdgeSourceFile ( { edgeFunctionDir, file : 'ipx.ts' , target : 'index.ts' } )
466
- await copyFile (
467
- join ( '.netlify' , 'functions-internal' , '_ipx' , 'imageconfig.json' ) ,
468
- join ( edgeFunctionDir , 'imageconfig.json' ) ,
469
- )
470
- manifest . functions . push ( {
471
- function : 'ipx' ,
472
- name : 'next/image handler' ,
473
- path : '/_next/image*' ,
474
- } )
475
- }
454
+ if (
455
+ destr ( process . env . NEXT_FORCE_EDGE_IMAGES ) &&
456
+ ! destr ( process . env . NEXT_DISABLE_EDGE_IMAGES ) &&
457
+ ! destr ( process . env . DISABLE_IPX )
458
+ ) {
459
+ usesEdge = true
460
+ console . log (
461
+ 'Using Netlify Edge Functions for image format detection. Set env var "NEXT_DISABLE_EDGE_IMAGES=true" to disable.' ,
462
+ )
463
+ const edgeFunctionDir = join ( edgeFunctionRoot , 'ipx' )
464
+ await ensureDir ( edgeFunctionDir )
465
+ await copyEdgeSourceFile ( { edgeFunctionDir, file : 'ipx.ts' , target : 'index.ts' } )
466
+ await copyFile (
467
+ join ( '.netlify' , 'functions-internal' , '_ipx' , 'imageconfig.json' ) ,
468
+ join ( edgeFunctionDir , 'imageconfig.json' ) ,
469
+ )
470
+ manifest . functions . push ( {
471
+ function : 'ipx' ,
472
+ name : 'next/image handler' ,
473
+ path : '/_next/image*' ,
474
+ } )
475
+ }
476
476
477
477
if ( usesEdge ) {
478
478
console . log ( outdent `
@@ -481,6 +481,5 @@ export const writeEdgeFunctions = async ({
481
481
` )
482
482
}
483
483
484
-
485
484
await writeJson ( join ( edgeFunctionRoot , 'manifest.json' ) , manifest )
486
485
}
0 commit comments