feat(config): Add app base URL path and API prefix configuration

This commit is contained in:
plimlips
2025-03-23 21:40:08 +08:00
parent ffc025c1ae
commit d634bfd682
3 changed files with 6 additions and 1 deletions
+4
View File
@@ -7,3 +7,7 @@ NEXT_PUBLIC_API_URL=
# APP type
# true for workflow apps
NEXT_PUBLIC_APP_TYPE_WORKFLOW=
# Base URL path for the application
NEXT_PUBLIC_APP_BASE_URL_PATH=
# API prefix path for the application
NEXT_PUBLIC_API_PREFIX=
+1 -1
View File
@@ -11,7 +11,7 @@ export const APP_INFO: AppInfo = {
default_language: 'en-US',
}
export const API_PREFIX = '/api'
export const API_PREFIX = `${process.env.NEXT_PUBLIC_API_PREFIX || '/api'}`
export const LOCALE_COOKIE_NAME = 'locale'
+1
View File
@@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: process.env.NEXT_PUBLIC_APP_BASE_URL_PATH,
productionBrowserSourceMaps: false, // enable browser source map generation during the production build
// Configure pageExtensions to include md and mdx
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],