Update build-wrapper.sh

This commit is contained in:
kleap-admin 2026-01-16 15:56:40 +00:00
parent a249c33fba
commit 58b136fa84
1 changed files with 25 additions and 0 deletions

25
build-wrapper.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
# BUILD WRAPPER - Optimized for constrained environments
# Uses less memory by disabling type checks during the heavy "Collecting page data" phase
set -e # Exit on any error
echo "🚀 Starting build..."
# Ensure we are building in the right mode
echo "Attempting build with optimizations..."
# Reduced memory limit to avoid being killed by the container, and disabled linting/typechecking
NEXT_TELEMETRY_DISABLED=1 NODE_OPTIONS="--max-old-space-size=2048" NEXT_SKIP_TYPE_CHECK=1 NEXT_SKIP_LINTING=1 npx next build
# Verify build output exists
if [ -d ".next" ]; then
echo "✅ .next directory found."
ls -la .next | head -n 10
else
echo "❌ Error: .next directory NOT found after build!"
exit 1
fi
echo "✅ Build succeeded!"
exit 0