Files
HeXi/hexi/plugins/nonebot_plugin_learning_chat/web/learning-chat-admin/vite.config.ts
T

26 lines
661 B
TypeScript
Raw Normal View History

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'node:path'
export default defineConfig({
plugins: [vue()],
// 构建产物由 bot 在 /learning_chat 路径下提供
base: '/learning_chat/',
resolve: {
alias: {
'@': path.resolve(process.cwd(), 'src'),
},
},
server: {
port: 5173,
open: false,
host: '0.0.0.0',
// 开发模式下 API 请求转发到 bot 端口
proxy: {
'/learning_chat/api': {
target: 'http://localhost:39697',
changeOrigin: true,
},
},
},
})