From bf8e4cbb2b47bbd447251da79ff9a4f73c064ea3 Mon Sep 17 00:00:00 2001 From: kongjiacong Date: Mon, 23 Dec 2024 20:39:44 +0800 Subject: [PATCH] chore: add comment --- .../server/core/src/plugins/render/render.ts | 9 +----- pnpm-lock.yaml | 32 +++++++++---------- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/packages/server/core/src/plugins/render/render.ts b/packages/server/core/src/plugins/render/render.ts index a77b71af63e..e73a9928795 100644 --- a/packages/server/core/src/plugins/render/render.ts +++ b/packages/server/core/src/plugins/render/render.ts @@ -80,6 +80,7 @@ function matchRoute( const result = matched[0][0]; + // here we can parse the dynamic server routes params return result || []; } @@ -237,14 +238,6 @@ async function renderHandler( mode: 'ssr' | 'csr', onError: (e: unknown) => Promise, ) { - // inject server.baseUrl message - const serverData = { - router: { - baseUrl: options.routeInfo.urlPath, - params: options.params, - }, - }; - let response: Response | null = null; const { serverManifest } = options; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d67e01ec558..0ed2c451628 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3808,10 +3808,10 @@ importers: version: link:../../toolkit/utils '@storybook/react': specifier: ~7.6.1 - version: 7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3) + version: 7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3) storybook: specifier: ~7.6.1 - version: 7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + version: 7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: '@storybook/types': specifier: ~7.6.12 @@ -27381,7 +27381,7 @@ snapshots: '@storybook/components': 7.6.20(@types/react-dom@18.3.5(@types/react@18.3.16))(@types/react@18.3.16)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@storybook/core-events': 7.6.20 '@storybook/csf': 0.1.11 - '@storybook/docs-tools': 7.6.20(encoding@0.1.13) + '@storybook/docs-tools': 7.6.20 '@storybook/global': 5.0.0 '@storybook/manager-api': 7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@storybook/preview-api': 7.6.20 @@ -27407,7 +27407,7 @@ snapshots: - encoding - supports-color - '@storybook/builder-manager@7.6.20(encoding@0.1.13)': + '@storybook/builder-manager@7.6.20': dependencies: '@fal-works/esbuild-plugin-global-externals': 2.1.2 '@storybook/core-common': 7.6.20(encoding@0.1.13) @@ -27438,7 +27438,7 @@ snapshots: telejson: 7.2.0 tiny-invariant: 1.3.3 - '@storybook/cli@7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)': + '@storybook/cli@7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/core': 7.26.0 '@babel/preset-env': 7.26.0(@babel/core@7.26.0) @@ -27447,10 +27447,10 @@ snapshots: '@storybook/codemod': 7.6.20 '@storybook/core-common': 7.6.20(encoding@0.1.13) '@storybook/core-events': 7.6.20 - '@storybook/core-server': 7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + '@storybook/core-server': 7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@storybook/csf-tools': 7.6.20 '@storybook/node-logger': 7.6.20 - '@storybook/telemetry': 7.6.20(encoding@0.1.13) + '@storybook/telemetry': 7.6.20 '@storybook/types': 7.6.20 '@types/semver': 7.5.8 '@yarnpkg/fslib': 2.10.3 @@ -27565,11 +27565,11 @@ snapshots: dependencies: ts-dedent: 2.2.0 - '@storybook/core-server@7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10)': + '@storybook/core-server@7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@aw-web-design/x-default-browser': 1.4.126 '@discoveryjs/json-ext': 0.5.7 - '@storybook/builder-manager': 7.6.20(encoding@0.1.13) + '@storybook/builder-manager': 7.6.20 '@storybook/channels': 7.6.20 '@storybook/core-common': 7.6.20(encoding@0.1.13) '@storybook/core-events': 7.6.20 @@ -27580,7 +27580,7 @@ snapshots: '@storybook/manager': 7.6.20 '@storybook/node-logger': 7.6.20 '@storybook/preview-api': 7.6.20 - '@storybook/telemetry': 7.6.20(encoding@0.1.13) + '@storybook/telemetry': 7.6.20 '@storybook/types': 7.6.20 '@types/detect-port': 1.3.5 '@types/node': 18.19.64 @@ -27641,7 +27641,7 @@ snapshots: '@storybook/docs-mdx@0.1.0': {} - '@storybook/docs-tools@7.6.20(encoding@0.1.13)': + '@storybook/docs-tools@7.6.20': dependencies: '@storybook/core-common': 7.6.20(encoding@0.1.13) '@storybook/preview-api': 7.6.20 @@ -27730,11 +27730,11 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@storybook/react@7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3)': + '@storybook/react@7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.3.3)': dependencies: '@storybook/client-logger': 7.6.20 '@storybook/core-client': 7.6.20 - '@storybook/docs-tools': 7.6.20(encoding@0.1.13) + '@storybook/docs-tools': 7.6.20 '@storybook/global': 5.0.0 '@storybook/preview-api': 7.6.20 '@storybook/react-dom-shim': 7.6.20(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -27767,7 +27767,7 @@ snapshots: memoizerific: 1.11.3 qs: 6.13.0 - '@storybook/telemetry@7.6.20(encoding@0.1.13)': + '@storybook/telemetry@7.6.20': dependencies: '@storybook/client-logger': 7.6.20 '@storybook/core-common': 7.6.20(encoding@0.1.13) @@ -38351,9 +38351,9 @@ snapshots: store2@2.14.3: {} - storybook@7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10): + storybook@7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: - '@storybook/cli': 7.6.20(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) + '@storybook/cli': 7.6.20(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - encoding