Skip to content

feat: use display names for edge functions #1669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 14, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/runtime/src/helpers/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const writeEdgeFunction = async ({
}): Promise<
Array<{
function: string
name: string
pattern: string
}>
> => {
Expand Down Expand Up @@ -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 = ({
Expand All @@ -176,6 +177,7 @@ export const writeDevEdgeFunction = async ({
functions: [
{
function: 'next-dev',
name: 'netlify dev handler',
path: '/*',
},
],
Expand Down Expand Up @@ -226,6 +228,7 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => {
)
manifest.functions.push({
function: 'ipx',
name: 'next/image handler',
path: '/_next/image*',
})
}
Expand Down