summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/build8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/build b/bin/build
index 0517af5..c410156 100755
--- a/bin/build
+++ b/bin/build
@@ -24,6 +24,14 @@ if [[ "${1:-}" == "--no-frontend" ]]; then
BUILD_FRONTEND=0
fi
+# Recompile all TypeScript packages (composite project references) so the
+# dist/*.js files are up to date with the .ts source. The packages' package.json
+# `main` fields point to dist/index.js, so bun build --compile reads the compiled
+# JavaScript — without this step, source edits are silently lost in the binary.
+echo "[build] tsc --build (recompile packages from source)"
+cd "$BACKEND"
+bunx tsc --build 2>&1 | tail -5
+
echo "[build] backend binary → dist/dispatch-server"
mkdir -p "$ROOT/dist"
bun build --compile "$BACKEND/packages/host-bin/src/main.ts" \