Files
supabase/apps/docs/lib/constants.ts
T
Charis 220915094c chore(docs): remove preview build shortcuts (#28641)
Now that production builds are fast, let's remove the preview build
shortcuts. (One of them didn't work anyway.) Having different preview
and production builds can lead to edge case bugs making it into master,
and we won't see much further build time improvement that's worth the
risk.
2024-08-14 17:08:01 -04:00

12 lines
622 B
TypeScript

export const API_URL = (
process.env.NODE_ENV === 'development'
? process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080'
: process.env.NEXT_PUBLIC_API_URL
)?.replace(/\/platform$/, '')
export const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || '/docs'
export const IS_DEV = process.env.NODE_ENV === 'development'
export const IS_PLATFORM = process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
export const IS_PREVIEW = process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
export const LOCAL_SUPABASE = process.env.NEXT_PUBLIC_LOCAL_SUPABASE === 'true'
export const MISC_URL = process.env.NEXT_PUBLIC_MISC_URL ?? ''