build: use WEB_GO for web targets and preserve backend dist directory (#1671)

Separate web Go commands from the default Go toolchain so web builds,
tests, and vet can enable CGO on Darwin without affecting the rest of
the project. Also ensure frontend backend builds recreate backend/dist
with a .gitkeep file so the embedded output directory remains tracked.
This commit is contained in:
wenjie authored and GitHub committed 2026-03-17 15:23:49 +08:00
1 parent b402888bfa
commit 0499cdab72
4 files changed
+27 -13

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build:backend": "tsc -b && vite build --outDir ../backend/dist --emptyOutDir",
"build:backend": "tsc -b && vite build --outDir ../backend/dist --emptyOutDir && node ./scripts/ensure-backend-gitkeep.cjs",
"lint": "eslint .",
"preview": "vite preview",
"format": "prettier --check .",