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 + } + } + } })