chore: 规范化常量配置

This commit is contained in:
wangxuefeng
2025-03-05 18:30:41 +08:00
parent 261dd5bb67
commit eecc2b1893
13 changed files with 34 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ VITE_NODE_ENV = 'development'
VITE_BASE_URL = /
# 前端可见变量(必须以 VITE_ 开头)
VITE_PORT = 10010
VITE_PORT = 10012
# VITE_BASE_API_URL = 'https://custom-chart-pre-api.shiyue.com/'
VITE_BASE_API_URL = 'https://custom-chart-api.shiyuegame.com/'

View File

@@ -7,7 +7,7 @@ import path from "path";
// @ts-ignore
export default defineConfig(({ mode }) => {
console.log("mode", mode);
const env = loadEnv(mode, process.cwd(), ["VITE_"]);
const env = loadEnv(mode, process.cwd(), ["VITE_", "Y_CODE_"]);
return {
server: {

View File

@@ -0,0 +1,2 @@
// @ts-ignore
export const currentEnv = __APP_ENV__;

View File

@@ -0,0 +1 @@
export * from "./env";