mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
[next] add .action handling for dynamic routes (#11461)
Follow-up to: - https://github.com/vercel/vercel/pull/11454 Adds similar handling for dynamic routes
This commit is contained in:
@@ -432,6 +432,15 @@ export async function getDynamicRoutes({
|
||||
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
||||
});
|
||||
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.action)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.action$1'),
|
||||
});
|
||||
|
||||
routes.push(route);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user