Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

perf: minify bundled API functions to cut packaging volume 33%

nrpo379a48d1cb1e
diff --git a/scripts/bundle-api.mjs b/scripts/bundle-api.mjs
index 86d94f15c..8480fec0f 100644
--- a/scripts/bundle-api.mjs
+++ b/scripts/bundle-api.mjs
@@ -170,7 +170,15 @@ function esbuildArgs(files) {
`--outbase=${API_DIR}`,
'--allow-overwrite',
'--tree-shaking=true',
- '--minify=false',
+ // Whitespace+syntax minify cuts total function output from 2.33 GB to
+ // 1.55 GB (-33%, measured on all 803 routes) — that volume is what Vercel's
+ // post-build packaging phase chews on, and it's what pushed cold builds past
+ // the 45-min BUILD_EXCEEDED_MAXIMUM_TIME ceiling on the new team (2026-07-03,
+ // every production deploy dead, site down). Identifiers are deliberately NOT
+ // minified: stack traces stay readable and code relying on function/class
+ // names keeps working.
+ '--minify-whitespace',
+ '--minify-syntax',
'--log-level=warning',
'--log-override:unsupported-dynamic-import=silent',
'--log-override:duplicate-object-key=silent',