Files
track/frontend
duxingchen 9d204a57d8 perf(frontend): 路由级代码分割 — React.lazy + Suspense
将所有页面组件改为按路由懒加载,Layout 组件保持静态导入。
新增 LoadingSpinner 作为 Suspense 回退组件。
html5-qrcode (~200KB) 和 antd 仅在访问扫码/管理后台路由时加载。
2026-08-06 17:33:48 +08:00
..
2026-08-04 10:05:59 +08:00
2026-08-04 10:05:59 +08:00
2026-08-04 10:05:59 +08:00
2026-08-04 10:05:59 +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.