From c5c6fa800cedd37cea0e3cc3e68df78b47ee2813 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 28 八月 2023 10:37:59 +0800
Subject: [PATCH] 111
---
screen_standard/vite.config.js | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/screen_standard/vite.config.js b/screen_standard/vite.config.js
index 6843aff..bf4e9bc 100644
--- a/screen_standard/vite.config.js
+++ b/screen_standard/vite.config.js
@@ -11,7 +11,10 @@
// https://vitejs.dev/config/
export default defineConfig(({mode, command}) => {
let env = loadEnv(mode, process.cwd(), '')
- // console.log(env.NODE_ENV);
+ // console.log('-------');
+ // console.log(env.VITE_BASE_PATH);
+ // console.log(env.VITE_BASE_PATH.replace(env.VITE_BASE_PATH, ''));
+ // console.log('-------');
return {
base:env.VITE_BASE_CONTEXT,
plugins: [
@@ -39,6 +42,8 @@
// 鏈湴杩愯閰嶇疆锛屽強鍙嶅悜浠g悊閰嶇疆
server: {
+ host: '192.168.0.3',
+ port: '8080',
cors: true, // 榛樿鍚敤骞跺厑璁镐换浣曟簮
open: true, // 鍦ㄦ湇鍔″櫒鍚姩鏃惰嚜鍔ㄥ湪娴忚鍣ㄤ腑鎵撳紑搴旂敤绋嬪簭
//鍙嶅悜浠g悊閰嶇疆锛屾敞鎰弐ewrite鍐欐硶锛屽紑濮嬫病鐪嬫枃妗e湪杩欓噷韪╀簡鍧�
@@ -47,7 +52,8 @@
target: env.VITE_BASE_URL, // 閫氳繃浠g悊鎺ュ彛璁块棶瀹為檯鍦板潃銆傝繖閲屾槸瀹為檯璁块棶鐨勫湴鍧�銆倂ue浼氶�氳繃浠g悊鏈嶅姟鍣ㄦ潵浠g悊璇锋眰
changeOrigin: true,
ws: false, // 鍏佽websocket浠g悊
- rewrite: (path) => path.replace(/^\[env.VITE_BASE_PATH]/, '') // 灏哸pi鏇挎崲涓虹┖
+ secure: false,
+ rewrite: (path) => path.replace(env.VITE_BASE_PATH, '/')
}
}
}
--
Gitblit v1.9.3