Sfoglia il codice sorgente

Skip tsc type-checking during Pi builds to avoid OOM

Use `npx vite build` instead of `npm run build` (which runs
`tsc -b && vite build`). TypeScript's type checker loads the
entire type graph into memory, exceeding the Pi's heap limit.
Vite's esbuild handles transpilation with minimal memory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tuanchris 4 mesi fa
parent
commit
a26960a9b7
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 2 2
      dw
  2. 1 1
      setup-pi.sh

+ 2 - 2
dw

@@ -125,7 +125,7 @@ cmd_update() {
     echo "Rebuilding frontend..."
     cd "$INSTALL_DIR/frontend"
     npm ci --loglevel=error
-    npm run build
+    npx vite build
     cd "$INSTALL_DIR"
 
     # Update nginx config
@@ -313,7 +313,7 @@ cmd_checkout() {
     echo "Rebuilding frontend..."
     cd "$INSTALL_DIR/frontend"
     npm ci --loglevel=error
-    npm run build
+    npx vite build
     cd "$INSTALL_DIR"
 
     # Update Python dependencies

+ 1 - 1
setup-pi.sh

@@ -286,7 +286,7 @@ deploy_native() {
     print_step "Building frontend..."
     cd "$INSTALL_DIR/frontend"
     npm ci --loglevel=error
-    npm run build
+    npx vite build
     cd "$INSTALL_DIR"
 
     # Ensure nginx (www-data) can traverse to static files