fix
This commit is contained in:
parent
7c7acef535
commit
20336eeadd
@ -1,13 +1,15 @@
|
||||
import { defineConfig } from "vite";
|
||||
import uni from "@dcloudio/vite-plugin-uni";
|
||||
// https://vitejs.dev/config/
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
server: {
|
||||
// 选项写法
|
||||
"/": {
|
||||
"/api": {
|
||||
target: process.env.VITE_API_URL, // 目标地址
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||
},
|
||||
host: "0.0.0.0", // 这个用于启动
|
||||
port: 8093, // 指定启动端口
|
||||
|
Loading…
Reference in New Issue
Block a user