We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49b8a41 commit b574520Copy full SHA for b574520
src/adapter/build/routing.ts
@@ -330,19 +330,16 @@ export async function generateRoutingRules(
330
// server actions name meta routes
331
332
...(hasMiddleware
333
- ? [
334
- {
+ ? (nextAdapterContext.outputs.middleware!.config.matchers?.map((matcher, index) => {
+ return {
335
// originally: middleware route
336
- description: 'Middleware',
337
- // match: {
338
- // path: 'test',
339
- // },
340
341
- // path: 'wat',
342
+ description: `Middleware (matcher #${index})`,
+ match: {
+ path: matcher.sourceRegex,
+ },
343
apply: { type: 'middleware' },
344
- } as const,
345
- ]
+ } as const
+ }) ?? [])
346
: []),
347
348
// ...convertedRewrites.beforeFiles,
0 commit comments