468d1d27dd
- 移除未登录全页面拦截,改为浏览自由 + 功能使用时弹窗 - 修复PageTransition退出动画卡死导致黑屏的bug - CanvasPage添加加载中状态避免首次访问黑屏假死 - 全站7个工具页添加页面保活机制,切页后台任务不中断 - 修复未登录时401误触发"用户已在别处登录"弹窗 - 删除MorePage模板板块、微信登录、EcommerceTemplates/SizeTemplate路由 - 剧本评分接入DashScope qwen3.7-max直连API - 电商视频生成重构为3阶段可视管线(策划→生成图片→生成视频) - 电商视频保活增强:异步函数直接写localStorage避免卸载丢失 - Workbench侧边栏移除mode过滤,三模式共用同一对话列表 - 首页更新轮播图/背景视频、按钮跳转修正、文案优化 - AppShell顶栏新增网站备案信息按钮 - 多个页面的terminate/cancel按钮覆盖、单镜头重试、批量保存下载 Co-Authored-By: Claude Code <noreply@anthropic.com>
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import react from "@vitejs/plugin-react";
|
|
import { compression } from "vite-plugin-compression2";
|
|
import { defineConfig, loadEnv } from "vite";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), "");
|
|
|
|
return {
|
|
plugins: [
|
|
react(),
|
|
compression({ algorithms: ["gzip", "brotliCompress"], threshold: 1024 }),
|
|
],
|
|
server: {
|
|
port: 5174,
|
|
host: "127.0.0.1",
|
|
proxy: {
|
|
"/api": {
|
|
target: env.VITE_DEV_PROXY || "http://47.110.225.76:3600",
|
|
changeOrigin: true,
|
|
},
|
|
"/dashscope-api": {
|
|
target: "https://dashscope.aliyuncs.com",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/dashscope-api/, "/compatible-mode/v1"),
|
|
},
|
|
},
|
|
},
|
|
preview: {
|
|
port: 4174,
|
|
host: "127.0.0.1",
|
|
},
|
|
esbuild: {
|
|
drop: ["console", "debugger"],
|
|
},
|
|
build: {
|
|
sourcemap: "hidden",
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id: string) {
|
|
if (id.includes("node_modules/react") || id.includes("node_modules/react-dom") || id.includes("node_modules/scheduler")) {
|
|
return "vendor-react";
|
|
}
|
|
if (id.includes("node_modules/@ant-design") || id.includes("node_modules/antd") || id.includes("node_modules/rc-")) {
|
|
return "vendor-antd";
|
|
}
|
|
if (id.includes("node_modules/@xyflow")) {
|
|
return "vendor-xyflow";
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
}); |