From 1a39ac37db6db639a82c1115432fd8cd0cf75108 Mon Sep 17 00:00:00 2001 From: maulanasdqn Date: Wed, 21 Jan 2026 18:25:53 +0700 Subject: [PATCH] fix(nix): improve Nx crash recovery for Vite builds Use '|| true' to always continue past Nx terminal crash, then verify build output directory exists separately. --- nix/mkViteApp.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/mkViteApp.nix b/nix/mkViteApp.nix index d00622b..955fabd 100644 --- a/nix/mkViteApp.nix +++ b/nix/mkViteApp.nix @@ -28,7 +28,9 @@ pkgs.buildNpmPackage { export NX_NATIVE=false ${pkgs.lib.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (k: v: "export ${k}=\"${v}\"") envVars)} # Run nx build, ignore terminal crash after successful build - ./node_modules/.bin/nx build ${name} --output-style=static || test -d dist/apps/${name} + ./node_modules/.bin/nx build ${name} --output-style=static || true + # Verify the build output exists + test -d dist/apps/${name} runHook postBuild '';