From 985662cb22d020fa500ba0845a675c3c91267fae Mon Sep 17 00:00:00 2001 From: imbytecat Date: Wed, 21 Jan 2026 22:09:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E5=91=BD=E5=90=8D=20outfi?= =?UTF-8?q?lePrefix=20=E4=B8=BA=20outfile=20=E5=B9=B6=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将构建配置中的 outfilePrefix 更名为 outfile,并统一更新相关代码以使用新的字段名。 --- apps/server/build.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/server/build.ts b/apps/server/build.ts index f8630dc..d77ced3 100644 --- a/apps/server/build.ts +++ b/apps/server/build.ts @@ -26,7 +26,7 @@ type BunTarget = Schema.Schema.Type const BuildConfigSchema = Schema.Struct({ entrypoint: Schema.String.pipe(Schema.nonEmptyString()), outputDir: Schema.String.pipe(Schema.nonEmptyString()), - outfilePrefix: Schema.String.pipe(Schema.nonEmptyString()), + outfile: Schema.String.pipe(Schema.nonEmptyString()), targets: Schema.Array(BunTargetSchema).pipe(Schema.minItems(1)), }) @@ -95,7 +95,7 @@ class BuildConfigService extends Context.Tag('BuildConfigService')< BuildConfigService.fromRaw({ entrypoint: '.output/server/index.mjs', outputDir: 'out', - outfilePrefix: 'server', + outfile: 'server', targets: ['bun-windows-x64', 'bun-darwin-arm64', 'bun-linux-x64'], } satisfies BuildConfig), ) @@ -150,7 +150,7 @@ class BuildService extends Context.Tag('BuildService')< Bun.build({ entrypoints: [config.entrypoint], compile: { - outfile: `${config.outfilePrefix}-${getTargetSuffix(target)}`, + outfile: `${config.outfile}-${getTargetSuffix(target)}`, target: target, }, outdir: config.outputDir, @@ -181,7 +181,7 @@ class BuildService extends Context.Tag('BuildService')< Bun.build({ entrypoints: [config.entrypoint], compile: { - outfile: `${config.outfilePrefix}-${getTargetSuffix(target)}`, + outfile: `${config.outfile}-${getTargetSuffix(target)}`, target: target, }, outdir: config.outputDir,