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.
This commit is contained in:
maulanasdqn
2026-01-21 18:25:53 +07:00
parent e5dc784301
commit 1a39ac37db
+3 -1
View File
@@ -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
'';