Files
qlib/frontend/web/next.config.ts
T
Simon 24f98e90c6 feat(web): 按 ui-ux-pro-max 设计系统重构前端(侧边导航 + 组件库 + 图标 + 可视化)
- 设计令牌与组件体系:语义色/间距/圆角/状态 + Card/Metric/Pill/Btn/Field/Empty/Skeleton/Progress 等
- 桌面左侧导航 + 窄屏抽屉(usePathname 高亮、ESC/遮罩关闭);修复抽屉/遮罩占据网格把 main 挤到第二行的问题
- 自绘内联 SVG 图标集替代 emoji;图标/表格/按钮等交互态齐全,空态/加载/错误/禁用态补齐
- 因子研究分层柱状、因子组合与回测净值/回撤双图 + 月度收益热力表、实验页任务状态徽标
- LineChart 主题化并按需引入 echarts(回测/组合首载 JS 448k→281k);next.config 放行局域网 dev 来源
2026-09-08 21:48:20 +08:00

17 lines
746 B
TypeScript
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 type { NextConfig } from "next";
const nextConfig: NextConfig = {
reactStrictMode: true,
// 局域网/远程设备访问 dev server 时,/_next/* 资源按允许来源放行(Next 15.5+)
allowedDevOrigins: ["192.168.1.160", "127.0.0.1", "localhost"],
// 同源代理:页面请求 /api/* → 后端 FastAPI(默认 127.0.0.1:8000)
// 使任何 IP/域名访问前端都无需 CORS 与硬编码后端地址。
// 后端地址可用环境变量 BACKEND_API_URL 覆盖(如 0.0.0.0 部署到别的机器)。
async rewrites() {
const backend = process.env.BACKEND_API_URL ?? "http://127.0.0.1:8000";
return [{ source: "/api/:path*", destination: `${backend}/api/:path*` }];
},
};
export default nextConfig;