Files
affiliate_dash/frontend
yml2213 c9e35d5d90 perf(web): 路由级懒加载,修复失效 useMemo 与 HMR 全页刷新
- 11 个页面改为 React.lazy;Login 与 MainLayout 保持同步加载(未登录用户与
  登录后首帧的必经路径);新增统一占位 RouteFallback,替换权限校验处重复的 div
  首屏静态资源 gzip 497.7 kB → 268.4 kB(-46.1%),>500 kB 体积警告消失
- PlatformUsers 的 columns/memberColumns/merchantColumns 每次渲染都重建,
  使依赖它们的 items 的 useMemo 完全失效;三个回调 useCallback 化、
  三个列定义 useMemo 化,让 memo 真正命中
- useAuth/AuthContext 拆到 store/authContext.ts,使 store/auth.tsx 只导出
  AuthProvider 组件,消除 react(only-export-components) 导致的 HMR 整页刷新
  (同步更新 7 处引用)
- MainLayout 未使用的 catch 参数清理

oxlint:5 warnings → 0 warnings / 0 errors。
2026-10-06 19:43:21 +08:00
..
2026-08-04 15:34:34 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-07-20 14:58:57 +08:00
2026-08-04 15:34:34 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the Oxlint configuration

If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["react", "typescript", "oxc"],
  "options": {
    "typeAware": true
  },
  "rules": {
    "react/rules-of-hooks": "error",
    "react/only-export-components": ["warn", { "allowConstantExport": true }]
  }
}

See the Oxlint rules documentation for the full list of rules and categories.