新增 ai-writing-researcher/outliner/writer/editor 种子 agent、_agent_runner 与 use_builtin_agents 灰度开关;四节点可按 flag 切换 SOUL 模式;时间线补大纲规划师配色并更新改造文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
import sourceIdentifierPlugin from "vite-plugin-source-identifier";
|
|
|
|
const rootDir = fileURLToPath(new URL(".", import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [sourceIdentifierPlugin(), react()],
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: "@/env",
|
|
replacement: path.resolve(rootDir, "src/env.ts"),
|
|
},
|
|
{
|
|
find: "next/navigation",
|
|
replacement: path.resolve(rootDir, "src/shims/next-navigation.ts"),
|
|
},
|
|
{
|
|
find: "next/link",
|
|
replacement: path.resolve(rootDir, "src/shims/next-link.tsx"),
|
|
},
|
|
{
|
|
find: "@vite",
|
|
replacement: path.resolve(rootDir, "src"),
|
|
},
|
|
{
|
|
find: "@",
|
|
replacement: path.resolve(rootDir, "src"),
|
|
},
|
|
],
|
|
},
|
|
"base":"./",
|
|
server: {
|
|
// 与 scripts/env.sh FRONTEND_PORT=5174、圆桌 wujie 嵌入文档一致。
|
|
port: 5173,
|
|
// 无界宿主跨域 fetch 子应用静态资源时,Vite 需回显请求的 Origin。
|
|
cors: true,
|
|
},
|
|
});
|