d3746fa6c7
- 后端新增 /ai/endpoint/test 和 /ai/endpoint/stream 接口,支持直接端点测试 - 前端增加行内测试功能(场景绑定+接口工作流) - 测试对话框增加动态参数表单和参数定义编辑 - 支持 _meta 格式的默认输入参数处理 - web、web-admin 本地开发环境 API 调用改为线上域名 https://lifescript.happylifeos.com Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
47 lines
1015 B
TypeScript
47 lines
1015 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: process.env.NODE_ENV === 'production' ? '/emotion-museum/' : '/',
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
define: {
|
|
global: 'globalThis',
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
open: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://lifescript.happylifeos.com',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: false,
|
|
rollupOptions: {
|
|
external: (id) => {
|
|
// 处理echarts的扩展模块问题
|
|
if (id.includes('echarts') && id.includes('extension')) {
|
|
return true
|
|
}
|
|
return false
|
|
},
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ['vue', 'vue-router', 'pinia'],
|
|
elementPlus: ['element-plus'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|