fix: update backendBaseUrl in next.config.ts to prioritize NEXT_API_BASE_URL

This commit is contained in:
mlogclub
2026-06-13 10:46:20 +08:00
parent daf1a176c1
commit a8755811b5
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ _web-build-spa:
@cd $(WEB_DIR) && $(PNPM) build:sdk && $(PNPM) build
_web-dev:
@cd $(WEB_DIR) && NEXT_PUBLIC_API_BASE_URL="$(DEV_API_BASE_URL)" $(PNPM) dev
@cd $(WEB_DIR) && NEXT_PUBLIC_API_BASE_URL="" NEXT_API_BASE_URL="$(DEV_API_BASE_URL)" $(PNPM) dev
_prepare-dist:
@mkdir -p $(DIST_DIR)
+3 -1
View File
@@ -2,7 +2,9 @@ import type { NextConfig } from "next"
import { PHASE_DEVELOPMENT_SERVER } from "next/constants"
const backendBaseUrl =
process.env.NEXT_PUBLIC_API_BASE_URL?.trim() || "http://127.0.0.1:8083"
process.env.NEXT_API_BASE_URL?.trim() ||
process.env.NEXT_PUBLIC_API_BASE_URL?.trim() ||
"http://127.0.0.1:8083"
const productionBasePath = ""
export default function nextConfig(phase: string): NextConfig {