mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
update:开发前端时,将api开头的路径转发到8002端口
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user