Skip to content

Commit 408ba35

Browse files
committed
chore: clean up unused code path
1 parent 22ea91b commit 408ba35

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/build/functions/edge.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,17 +313,11 @@ const buildHandlerDefinition = (
313313
ctx: PluginContext,
314314
def: EdgeOrNodeMiddlewareDefinition,
315315
): Array<ManifestFunction> => {
316-
const functionHandlerName = getHandlerName({ name: def.name })
317-
const functionName = 'Next.js Middleware Handler'
318-
const cache = def.name.endsWith('middleware') ? undefined : ('manual' as const)
319-
const generator = `${ctx.pluginName}@${ctx.pluginVersion}`
320-
321316
return augmentMatchers(def.matchers, ctx).map((matcher) => ({
322-
function: functionHandlerName,
323-
name: functionName,
317+
function: getHandlerName({ name: def.name }),
318+
name: 'Next.js Middleware Handler',
324319
pattern: matcher.regexp,
325-
cache,
326-
generator,
320+
generator: `${ctx.pluginName}@${ctx.pluginVersion}`,
327321
}))
328322
}
329323

0 commit comments

Comments
 (0)