From e7fb0c1708ac2ccaffd5bbbdcdd15838a5b6f6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E9=A3=8E?= Date: Mon, 9 Oct 2023 17:56:09 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feature:=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89SSR=E6=9E=84=E5=BB=BA=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=EF=BC=8C=E9=BB=98=E8=AE=A4=E4=B8=BAnode=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E9=85=8D=E7=BD=AE=E4=B8=BAwebworker=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=BF=90=E8=A1=8C=E5=9C=A8=E7=B1=BB=E4=BC=BCCloudflar?= =?UTF-8?q?e=20Workers=E7=9A=84=E5=B9=B3=E5=8F=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5b0946a70121a8f5c7332e70bd0aa4da904253e8. --- packages/preset-umi/src/features/ssr/ssr.ts | 1 - packages/preset-umi/src/features/ssr/webpack/webpack.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/preset-umi/src/features/ssr/ssr.ts b/packages/preset-umi/src/features/ssr/ssr.ts index d7ec11f8ffb6..2136eb37006b 100644 --- a/packages/preset-umi/src/features/ssr/ssr.ts +++ b/packages/preset-umi/src/features/ssr/ssr.ts @@ -27,7 +27,6 @@ export default (api: IApi) => { serverBuildPath: zod.string(), platform: zod.string(), builder: zod.enum(['esbuild', 'webpack']), - target: zod.enum(['node', 'webworker']), }) .deepPartial(); }, diff --git a/packages/preset-umi/src/features/ssr/webpack/webpack.ts b/packages/preset-umi/src/features/ssr/webpack/webpack.ts index a5a9ccb73a02..dd527d58f88f 100644 --- a/packages/preset-umi/src/features/ssr/webpack/webpack.ts +++ b/packages/preset-umi/src/features/ssr/webpack/webpack.ts @@ -40,8 +40,7 @@ export const build = async (api: IApi, opts: any) => { await oChainWebpack(memo); memo.entryPoints.clear(); memo.entry('umi').add(resolve(api.paths.absTmpPath, 'umi.server.ts')); - // 支持自定义SSR构建目标,默认为node,可配置为webworker以支持运行在类似Cloudflare Workers的平台 - memo.target(api.config.ssr.target || 'node'); + memo.target('node'); memo.name('umi'); memo.devtool(false);