Files
xiaozhi-esp32-server/main/manager-web/vue.config.js
T
c458a1b59a Test login api (#304)
* 优化登录注册流程,跑通注册登录、接口 (#297)

* fix manager-api bug

* 优化登录注册流程,跑通注册登录、接口

* update package

* update:第一个注册的用户是超级管理员

---------

Co-authored-by: zhisheng <pzs034@gmail.com>
Co-authored-by: hrz <1710360675@qq.com>
2025-03-12 23:31:59 +08:00

24 lines
642 B
JavaScript

const { defineConfig } = require('@vue/cli-service');
const dotenv = require('dotenv');
// 确保加载 .env 文件
dotenv.config();
module.exports = defineConfig({
devServer: {
// Bug 修复:将代理配置为环境变量中定义的 API 基础 URL
proxy: {
'/xiaozhi-esp32-api': {
target: process.env.VUE_APP_API_BASE_URL || 'http://localhost:8002', // 后端 API 的基础 URL
changeOrigin: true, // 允许跨域
// pathRewrite: {
// '^/api': '', // 路径重写
// },
},
},
client: {
overlay: false,
},
},
});