From 0f3bd1cd06db00775e29d181acaa0319ee58cfe6 Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期二, 12 八月 2025 21:42:36 +0800
Subject: [PATCH] 1
---
vite.config.mjs | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/vite.config.mjs b/vite.config.mjs
index 3cbb3d4..072c18b 100644
--- a/vite.config.mjs
+++ b/vite.config.mjs
@@ -1,3 +1,9 @@
+/*
+ * @Date: 2025-05-27 23:44:41
+ * @LastEditors: gaoshp
+ * @LastEditTime: 2025-06-16 11:56:09
+ * @FilePath: /mdmweb/vite.config.mjs
+ */
import {
defineConfig,
loadEnv
@@ -9,6 +15,11 @@
mode,
command
}) => {
+ let target = 'http://120.46.212.231:80';
+ if(mode === 'test') {
+ target = 'http://localhost:80';
+ console.log('褰撳墠鐜:',mode,command);
+ }
const env = loadEnv(mode, process.cwd())
const {
VITE_APP_ENV,
@@ -54,7 +65,7 @@
port: 2888,
proxy: {
'/api': {
- target: 'http://localhost',
+ target,
//target: 'https://saber3.bladex.cn/api',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
--
Gitblit v1.9.3