mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
Revert "[next] Reland add .action handling for dynamic routes" (#11509)
Reverts vercel/vercel#11487. This feature will be relanded behind a feature flag.
This commit is contained in:
@@ -321,7 +321,6 @@ export async function getDynamicRoutes({
|
||||
isServerMode,
|
||||
dynamicMiddlewareRouteMap,
|
||||
experimentalPPRRoutes,
|
||||
hasActionOutputSupport,
|
||||
}: {
|
||||
entryPath: string;
|
||||
entryDirectory: string;
|
||||
@@ -334,7 +333,6 @@ export async function getDynamicRoutes({
|
||||
isServerMode?: boolean;
|
||||
dynamicMiddlewareRouteMap?: ReadonlyMap<string, RouteWithSrc>;
|
||||
experimentalPPRRoutes: ReadonlySet<string>;
|
||||
hasActionOutputSupport: boolean;
|
||||
}): Promise<RouteWithSrc[]> {
|
||||
if (routesManifest) {
|
||||
switch (routesManifest.version) {
|
||||
@@ -425,25 +423,14 @@ export async function getDynamicRoutes({
|
||||
});
|
||||
}
|
||||
|
||||
if (hasActionOutputSupport) {
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?<nxtsuffix>(?:\\.action|\\.rsc))(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '$nxtsuffix$1'),
|
||||
});
|
||||
} else {
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.rsc)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
||||
});
|
||||
}
|
||||
routes.push({
|
||||
...route,
|
||||
src: route.src.replace(
|
||||
new RegExp(escapeStringRegexp('(?:/)?$')),
|
||||
'(?:\\.rsc)(?:/)?$'
|
||||
),
|
||||
dest: route.dest?.replace(/($|\?)/, '.rsc$1'),
|
||||
});
|
||||
|
||||
routes.push(route);
|
||||
}
|
||||
@@ -1500,7 +1487,6 @@ export type LambdaGroup = {
|
||||
isStreaming?: boolean;
|
||||
isPrerenders?: boolean;
|
||||
isExperimentalPPR?: boolean;
|
||||
isActionLambda?: boolean;
|
||||
isPages?: boolean;
|
||||
isApiLambda: boolean;
|
||||
pseudoLayer: PseudoLayer;
|
||||
|
||||
Reference in New Issue
Block a user