Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0c0a293

Browse files
committed
chore: clean up unused code path
1 parent 5713ffe commit 0c0a293

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)

AltStyle によって変換されたページ (->オリジナル) /