chore(dx/server): build all entrypoints with right ext

This commit is contained in:
Elian Doran 2025-08-31 22:43:21 +03:00
parent 0e5108bd08
commit dbf016adaf
No known key found for this signature in database

View File

@ -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();
}