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

@@ -26,7 +26,8 @@ const __APP_INFO__ = {
export default ({ command, mode }: ConfigEnv): UserConfig => {
console.log('mode', mode);
// 环境变量
const env = loadEnv(mode, process.cwd(), ['VITE_', 'VTJ_', 'SY_']);
const env = loadEnv(mode, process.cwd(), ['VITE_', 'VTJ_', 'SY_', 'Y_CODE_']);
console.log('env', env);
const isDev = command === 'serve';
return {
@@ -46,6 +47,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
server: {
open: true,
host: true,
port: Number(env.VITE_PORT),
proxy: {
'/api': {
target: 'https://custom-chart-pre-api.shiyue.com',