From 161183016fc02c4b0e78926ae199b82d61e6e4cc Mon Sep 17 00:00:00 2001 From: kongjiacong Date: Wed, 11 Dec 2024 15:40:04 +0800 Subject: [PATCH] chore: cr --- packages/server/core/src/plugins/render/render.ts | 1 - .../app-tools/src/plugins/analyze/getServerRoutes.ts | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/server/core/src/plugins/render/render.ts b/packages/server/core/src/plugins/render/render.ts index 4f8a56a3e8c..7b538479151 100644 --- a/packages/server/core/src/plugins/render/render.ts +++ b/packages/server/core/src/plugins/render/render.ts @@ -121,7 +121,6 @@ export async function createRender({ }, ) => { const forMatchpathname = matchPathname ?? getPathname(req); - const [routeInfo, params] = matchRoute(router, forMatchpathname); const framework = metaName || 'modern-js'; const fallbackHeader = `x-${cutNameByHyphen(framework)}-ssr-fallback`; diff --git a/packages/solutions/app-tools/src/plugins/analyze/getServerRoutes.ts b/packages/solutions/app-tools/src/plugins/analyze/getServerRoutes.ts index eb8976b0463..1c21b233d7a 100644 --- a/packages/solutions/app-tools/src/plugins/analyze/getServerRoutes.ts +++ b/packages/solutions/app-tools/src/plugins/analyze/getServerRoutes.ts @@ -245,12 +245,10 @@ export const getServerRoutes = ( appContext: AppToolsContext<'shared'>; config: AppNormalizedConfig<'shared'>; }, -): ServerRoute[] => { - return [ - ...collectHtmlRoutes(entrypoints, appContext, config), - ...collectStaticRoutes(appContext, config), - ]; -}; +): ServerRoute[] => [ + ...collectHtmlRoutes(entrypoints, appContext, config), + ...collectStaticRoutes(appContext, config), +]; const toPosix = (pathStr: string) => pathStr.split(path.sep).join(path.posix.sep);