0841b1a103
- 前端:Vue3 + TS + Element Plus,24 个页面路由(课件/组题/教案/动画/思维导图/作文批改/命题/课堂/资源/社区等) - 后端:FastAPI + SQLAlchemy + SQLite,17 个路由模块,AI 服务层含降级模板 - AI:glm-5.x 推理模型已禁用思维链,确保输出真实内容 - 修复:ai_service 两处请求体注入 enable_thinking/thinking disabled - 测试账号:13900999999 / test1234
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
import { resolve } from 'path'
|
|
|
|
export default defineConfig({
|
|
root: __dirname,
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
resolvers: [ElementPlusResolver()],
|
|
imports: ['vue', 'vue-router', 'pinia'],
|
|
dts: 'src/auto-imports.d.ts',
|
|
}),
|
|
Components({
|
|
resolvers: [ElementPlusResolver()],
|
|
dts: 'src/components.d.ts',
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_PROXY_TARGET || 'http://127.0.0.1:8000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vue: ['vue', 'vue-router', 'pinia'],
|
|
element: ['element-plus', '@element-plus/icons-vue'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|