fix: set default backendBaseUrl in next.config.ts and remove .env.development from .gitignore
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ import type { NextConfig } from "next"
|
|||||||
import { PHASE_DEVELOPMENT_SERVER } from "next/constants"
|
import { PHASE_DEVELOPMENT_SERVER } from "next/constants"
|
||||||
|
|
||||||
const backendBaseUrl =
|
const backendBaseUrl =
|
||||||
process.env.NEXT_PUBLIC_API_BASE_URL?.trim() || ""
|
process.env.NEXT_PUBLIC_API_BASE_URL?.trim() || "http://127.0.0.1:8083"
|
||||||
|
|
||||||
export default function nextConfig(phase: string): NextConfig {
|
export default function nextConfig(phase: string): NextConfig {
|
||||||
const config: NextConfig = {
|
const config: NextConfig = {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8083
|
|
||||||
@@ -33,7 +33,6 @@ yarn-error.log*
|
|||||||
# env files (can opt-in for committing if needed)
|
# env files (can opt-in for committing if needed)
|
||||||
.env*
|
.env*
|
||||||
!.env.example
|
!.env.example
|
||||||
!.env.development
|
|
||||||
|
|
||||||
# vercel
|
# vercel
|
||||||
.vercel
|
.vercel
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { NextConfig } from "next"
|
|||||||
import { PHASE_DEVELOPMENT_SERVER } from "next/constants"
|
import { PHASE_DEVELOPMENT_SERVER } from "next/constants"
|
||||||
|
|
||||||
const backendBaseUrl =
|
const backendBaseUrl =
|
||||||
process.env.NEXT_PUBLIC_API_BASE_URL?.trim() || ""
|
process.env.NEXT_PUBLIC_API_BASE_URL?.trim() || "http://127.0.0.1:8083"
|
||||||
|
|
||||||
export default function nextConfig(phase: string): NextConfig {
|
export default function nextConfig(phase: string): NextConfig {
|
||||||
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
||||||
|
|||||||
Reference in New Issue
Block a user