chore: 增加环境配置

This commit is contained in:
wangxuefeng 2025-03-05 18:03:59 +08:00
parent 47c9ec1aba
commit 261dd5bb67
10 changed files with 47 additions and 7 deletions

View File

@ -9,3 +9,9 @@ VITE_PORT = 10011
# VITE_BASE_API_URL = 'https://custom-chart-pre-api.shiyue.com/'
VITE_BASE_API_URL = 'https://custom-chart-api.shiyuegame.com/'
VITE_DEBUG_MODE = true
Y_CODE_PLATFORM_URL = 'https://localhost:10010/'
Y_CODE_DESIGNER_URL = 'https://localhost:10011/'
Y_CODE_RENDERER_URL = 'https://localhost:10012/'

View File

@ -5,3 +5,8 @@ VITE_NODE_ENV = 'production'
VITE_BASE_URL = /
VITE_BASE_API_URL = 'https://custom-chart-api.shiyuegame.com/'
Y_CODE_PLATFORM_URL = 'https://y-code-platform.shiyuegame.com/'
Y_CODE_DESIGNER_URL = 'https://y-code-designer.shiyuegame.com/'
Y_CODE_RENDERER_URL = 'https://y-code-renderer.shiyuegame.com/'

View File

@ -6,3 +6,7 @@ VITE_BASE_URL = /
# base api url
VITE_BASE_API_URL = 'https://custom-chart-pre-api.shiyue.com/'
Y_CODE_PLATFORM_URL = 'https://y-code-platform-pre.shiyue.com/'
Y_CODE_DESIGNER_URL = 'https://y-code-designer-pre.shiyue.com/'
Y_CODE_RENDERER_URL = 'https://y-code-renderer-pre.shiyue.com/'

View File

@ -35,7 +35,7 @@ const config = createViteConfig({
export default defineConfig(({ mode }) => {
console.log('mode', mode);
// 加载环境变量(支持 .env.development/.env.production
const env = loadEnv(mode, process.cwd(), ['VITE_', 'VTJ_', 'SY_']);
const env = loadEnv(mode, process.cwd(), ['VITE_', 'VTJ_', 'SY_', 'Y_CODE_']);
return {
...config,
server: {

View File

@ -9,3 +9,8 @@ VITE_PORT = 10010
# VITE_BASE_API_URL = 'https://custom-chart-pre-api.shiyue.com/'
VITE_BASE_API_URL = 'https://custom-chart-api.shiyuegame.com/'
VITE_DEBUG_MODE = true
Y_CODE_PLATFORM_URL = 'https://localhost:10010/'
Y_CODE_DESIGNER_URL = 'https://localhost:10011/'
Y_CODE_RENDERER_URL = 'https://localhost:10012/'

View File

@ -5,3 +5,7 @@ VITE_NODE_ENV = 'production'
VITE_BASE_URL = /
VITE_BASE_API_URL = 'https://custom-chart-api.shiyuegame.com/'
Y_CODE_PLATFORM_URL = 'https://y-code-platform.shiyuegame.com/'
Y_CODE_DESIGNER_URL = 'https://y-code-designer.shiyuegame.com/'
Y_CODE_RENDERER_URL = 'https://y-code-renderer.shiyuegame.com/'

View File

@ -6,3 +6,7 @@ VITE_BASE_URL = /
# base api url
VITE_BASE_API_URL = 'https://custom-chart-pre-api.shiyue.com/'
Y_CODE_PLATFORM_URL = 'https://y-code-platform-pre.shiyue.com/'
Y_CODE_DESIGNER_URL = 'https://y-code-designer-pre.shiyue.com/'
Y_CODE_RENDERER_URL = 'https://y-code-renderer-pre.shiyue.com/'

View File

@ -11,3 +11,7 @@ VITE_BASE_API_URL = 'https://custom-chart-api.shiyuegame.com/'
VITE_DEBUG_MODE = true
Y_CODE_PLATFORM_URL = 'https://localhost:10010/'
Y_CODE_DESIGNER_URL = 'https://localhost:10011/'
Y_CODE_RENDERER_URL = 'https://localhost:10012/'

View File

@ -5,3 +5,7 @@ VITE_NODE_ENV = 'production'
VITE_BASE_URL = /
VITE_BASE_API_URL = 'https://custom-chart-api.shiyuegame.com/'
Y_CODE_PLATFORM_URL = 'https://y-code-platform.shiyuegame.com/'
Y_CODE_DESIGNER_URL = 'https://y-code-designer.shiyuegame.com/'
Y_CODE_RENDERER_URL = 'https://y-code-renderer.shiyuegame.com/'

View File

@ -9,3 +9,7 @@ VITE_PORT = 10010
# base api url
VITE_BASE_API_URL = 'https://custom-chart-pre-api.shiyue.com/'
Y_CODE_PLATFORM_URL = 'https://y-code-platform-pre.shiyue.com/'
Y_CODE_DESIGNER_URL = 'https://y-code-designer-pre.shiyue.com/'
Y_CODE_RENDERER_URL = 'https://y-code-renderer-pre.shiyue.com/'