From 0bdc205497b92e27e4b836c9ae3bae27e327e420 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Sun, 16 Feb 2025 00:17:07 +0800 Subject: [PATCH] =?UTF-8?q?update:=E5=BC=80=E5=8F=91=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=B0=86api=E5=BC=80=E5=A4=B4=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=BD=AC=E5=8F=91=E5=88=B08002=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZhiKongTaiWeb/vite.config.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ZhiKongTaiWeb/vite.config.js b/ZhiKongTaiWeb/vite.config.js index 05c17402..d9db70a8 100644 --- a/ZhiKongTaiWeb/vite.config.js +++ b/ZhiKongTaiWeb/vite.config.js @@ -1,7 +1,20 @@ -import { defineConfig } from 'vite' +import {defineConfig} from 'vite' import vue from '@vitejs/plugin-vue' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [vue()], + server: { + open: true, // 自动启动浏览器 + host: "0.0.0.0", // localhost + port: 8001, // 端口号 + https: false, + hmr: {overlay: false}, + proxy: { + "^/(api)": { + target: "http://127.0.0.1:8002", + changeOrigin: true + } + } + } })