Skip to content

Commit

Permalink
Revert "feature: 支持自定义SSR构建目标,默认为node,可配置为webworker以支持运行在类似Cloudflare…
Browse files Browse the repository at this point in the history
… Workers的平台"

This reverts commit 5b0946a.
  • Loading branch information
奇风 committed Oct 9, 2023
1 parent 335e6a6 commit e7fb0c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion packages/preset-umi/src/features/ssr/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
},
Expand Down
3 changes: 1 addition & 2 deletions packages/preset-umi/src/features/ssr/webpack/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e7fb0c1

Please sign in to comment.