Files
ai-assistant-travel/vite.config.js
T
mp_1787300862_s8r25x 01dcd83987 feat: 拆解单文件 Demo 为 Vite + React 前端工程
- 保留根目录 index.html 作为 v1 单文件原型(不参与构建)
- app/ 下新建 Vite + React 工程(vite.config root 指向 app/,两版互不干扰)
- 状态收敛到 useAppStore(表单/消息/串行确认/一键发品 + 4 条异步编排流)
- 生成卡片重构为结构化数据驱动渲染,按钮为真实 React 事件
- 6 大表单模块卡片化;Agent 意图解析与偏好学习抽为独立 lib
- 功能与视觉与 v1 完全一致,浏览器端全流程回归通过
2026-09-16 13:37:58 +08:00

23 lines
662 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { fileURLToPath } from 'node:url'
/**
* 工程结构说明:
* - 仓库根目录的 index.html 是 v1 单文件演示快照,原样保留(不入 Vite 构建)。
* - Vite + React 应用的根目录为 app/,入口为 app/index.html,
* 这样两者互不干扰,可对照演示「单文件原型 → 前端工程化」的演进过程。
*/
export default defineConfig({
root: fileURLToPath(new URL('./app', import.meta.url)),
plugins: [react()],
build: {
outDir: '../dist',
emptyOutDir: true
},
server: {
port: 5173,
open: false
}
})