@@ -14,17 +14,21 @@ if [ -n "$BASE_PATH" ]; then
1414 # Escaped version first (for regex patterns in JSON)
1515 find /app/.next/static -type f -name " *.json" -exec sed -i " s|${BASEPATH_PLACEHOLDER_ESCAPED} |${ESCAPED_BASE_PATH} |g" {} + 2> /dev/null || true
1616 find /app/.next/static -type f \( -name " *.js" -o -name " *.json" \) -exec sed -i " s|${BASEPATH_PLACEHOLDER} |${BASE_PATH} |g" {} + 2> /dev/null || true
17- find /app/.next/server -type f \( -name " *.html" -o -name " *.rsc" \) -exec sed -i " s|${BASEPATH_PLACEHOLDER} |${BASE_PATH} |g" {} + 2> /dev/null || true
17+ find /app/.next/server -type f \( -name " *.html" -o -name " *.rsc" -o -name " *.meta " -o -name " *.body " \) -exec sed -i " s|${BASEPATH_PLACEHOLDER} |${BASE_PATH} |g" {} + 2> /dev/null || true
1818 find /app/.next/server -type f -name " *client-reference-manifest.js" -exec sed -i " s|${BASEPATH_PLACEHOLDER} |${BASE_PATH} |g" {} + 2> /dev/null || true
19+ # Also handle prerender manifests and action manifests
20+ find /app/.next -type f -name " *.json" -exec sed -i " s|${BASEPATH_PLACEHOLDER} |${BASE_PATH} |g" {} + 2> /dev/null || true
1921else
2022 echo " No BASE_PATH set, running at root path"
2123 sed -i " s|${BASEPATH_PLACEHOLDER} ||g" /app/server.js 2> /dev/null || true
2224 sed -i " s|${BASEPATH_PLACEHOLDER} ||g" /app/.next/routes-manifest.json 2> /dev/null || true
2325 # Escaped version first (for regex patterns in JSON)
2426 find /app/.next/static -type f -name " *.json" -exec sed -i " s|${BASEPATH_PLACEHOLDER_ESCAPED} ||g" {} + 2> /dev/null || true
2527 find /app/.next/static -type f \( -name " *.js" -o -name " *.json" \) -exec sed -i " s|${BASEPATH_PLACEHOLDER} ||g" {} + 2> /dev/null || true
26- find /app/.next/server -type f \( -name " *.html" -o -name " *.rsc" \) -exec sed -i " s|${BASEPATH_PLACEHOLDER} ||g" {} + 2> /dev/null || true
28+ find /app/.next/server -type f \( -name " *.html" -o -name " *.rsc" -o -name " *.meta " -o -name " *.body " \) -exec sed -i " s|${BASEPATH_PLACEHOLDER} ||g" {} + 2> /dev/null || true
2729 find /app/.next/server -type f -name " *client-reference-manifest.js" -exec sed -i " s|${BASEPATH_PLACEHOLDER} ||g" {} + 2> /dev/null || true
30+ # Also handle prerender manifests and action manifests
31+ find /app/.next -type f -name " *.json" -exec sed -i " s|${BASEPATH_PLACEHOLDER} ||g" {} + 2> /dev/null || true
2832fi
2933
3034API_URL=" ${NEXT_PUBLIC_API_URL:- http:// localhost: 8000} "
0 commit comments