From dbf016adaf6589215110a505eafae97f273bd9a2 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 31 Aug 2025 22:43:21 +0300 Subject: [PATCH] chore(dx/server): build all entrypoints with right ext --- apps/server/scripts/build.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/server/scripts/build.ts b/apps/server/scripts/build.ts index 225333bb0..85db1651d 100644 --- a/apps/server/scripts/build.ts +++ b/apps/server/scripts/build.ts @@ -7,11 +7,17 @@ const outDir = join(projectDir, "dist"); async function build() { esbuild.build({ - entryPoints: [ join(projectDir, "src/main.ts") ], + entryPoints: [ + join(projectDir, "src/main.ts"), + join(projectDir, "src/docker_healthcheck.ts") + ], tsconfig: join(projectDir, "tsconfig.app.json"), platform: "node", bundle: true, outdir: outDir, + outExtension: { + ".js": ".cjs" + }, format: "cjs", external: [ "electron", @@ -44,8 +50,7 @@ function copyAssets() { } async function main() { - fs.rmSync(outDir, { recursive: true }); - fs.mkdirSync(outDir); + fs.emptyDirSync(outDir); await build(); copyAssets(); }