Update build-wrapper.sh
This commit is contained in:
parent
28009770a4
commit
8c534c1e45
|
|
@ -1,25 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
# BUILD WRAPPER - Optimized for constrained environments
|
echo "Building..."
|
||||||
# Uses less memory by disabling type checks during the heavy "Collecting page data" phase
|
NEXT_TELEMETRY_DISABLED=1 npx next build
|
||||||
|
|
||||||
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
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue