From 3c091ba235cbf251c34048b9469adf4ebfa87320 Mon Sep 17 00:00:00 2001
From: xingyy <373639591@qq.com>
Date: Tue, 6 Aug 2024 20:54:10 +0800
Subject: [PATCH] 123
---
index.html | 5 +++--
vite.config.js | 12 ++++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 8388c4b..2943541 100644
--- a/index.html
+++ b/index.html
@@ -3,8 +3,9 @@
-
- Vite + Vue
+
+
+ 摄影展
diff --git a/vite.config.js b/vite.config.js
index e7f0954..71740f4 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -7,6 +7,18 @@ import {VantResolver} from '@vant/auto-import-resolver';
import UnoCSS from 'unocss/vite'
// https://vitejs.dev/config/
export default defineConfig({
+ server: {
+ host: '0.0.0.0', // 监听所有网络接口
+ port: 5878,
+ // 选项写法
+ proxy: {
+ '/pag': {
+ target: 'https://cdn.tmui.design',
+ changeOrigin: true,
+ rewrite: (path) => path.replace(/^\/api/, '/api')
+ },
+ }
+ },
plugins: [
vue(),
UnoCSS(),