From 2b786e4cd9deb5233db15dcf260b4e794d80e6a4 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 6 Oct 2022 16:28:56 +0100 Subject: [PATCH] feat: use display names for edge functions --- packages/runtime/src/helpers/edge.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/runtime/src/helpers/edge.ts b/packages/runtime/src/helpers/edge.ts index f17a776f16..465b17efba 100644 --- a/packages/runtime/src/helpers/edge.ts +++ b/packages/runtime/src/helpers/edge.ts @@ -129,6 +129,7 @@ const writeEdgeFunction = async ({ }): Promise< Array<{ function: string + name: string pattern: string }> > => { @@ -162,7 +163,7 @@ const writeEdgeFunction = async ({ // We add a defintion for each matching path return matchers.map((matcher) => { const pattern = matcher.regexp - return { function: name, pattern } + return { function: name, pattern, name: edgeFunctionDefinition.name } }) } export const cleanupEdgeFunctions = ({ @@ -176,6 +177,7 @@ export const writeDevEdgeFunction = async ({ functions: [ { function: 'next-dev', + name: 'netlify dev handler', path: '/*', }, ], @@ -226,6 +228,7 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => { ) manifest.functions.push({ function: 'ipx', + name: 'next/image handler', path: '/_next/image*', }) }