Skip to content

Commit e66ae0b

Browse files
committed
chore: prettier
1 parent a2dd1f1 commit e66ae0b

File tree

1 file changed

+22
-23
lines changed
  • packages/runtime/src/helpers

1 file changed

+22
-23
lines changed

packages/runtime/src/helpers/edge.ts

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -451,28 +451,28 @@ export const writeEdgeFunctions = async ({
451451
}
452452
}
453453

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+
}
476476

477477
if (usesEdge) {
478478
console.log(outdent`
@@ -481,6 +481,5 @@ export const writeEdgeFunctions = async ({
481481
`)
482482
}
483483

484-
485484
await writeJson(join(edgeFunctionRoot, 'manifest.json'), manifest)
486485
}

0 commit comments

Comments
 (0)