编码规范
Canonical source:
.qoder/repowiki/knowledge/zh/NeKiro Console 前端工程根 (React + Vite)/编码规范.md. This page is rendered from the Console-owned RepoWiki document and retains its canonical source language.- 所有需要暴露给浏览器端的环境变量统一以 VITE_ 前缀命名(如 VITE_NEKIRO_API_BASE_URL),由 Vite 在构建期注入。
- 模块导入使用 @/ 路径别名指向项目根目录,避免相对路径深层跳转。
- 脚本命令遵循 npm scripts 约定:dev/build/preview/lint/test/clean 分别对应开发、构建、预览、类型检查、测试与清理 dist/server.js。