26 lines
762 B
Bash
26 lines
762 B
Bash
#!/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
|