This commit is contained in:
2026-10-18 21:50:40 +08:00
parent 4e2459f2c8
commit 90ee2b30f5
3 changed files with 107 additions and 0 deletions
@@ -0,0 +1,12 @@
# Checklist
- [ ] `src/App.tsx` 全部模块组件改为 `React.lazy()` 动态导入,`<Suspense>` 兜底生效
- [ ] `npx tsc -b` 类型检查通过
- [ ] `npm run build` 成功,`dist/assets` 中每个模块的 CSS 为独立 chunk 文件
- [ ] `scripts/check-module-styles.mjs` 存在且能正确检测 `:root`/`html`/`body`/`*`/裸元素选择器/`@import` 重置,违规时非 0 退出并列出文件+行号
- [ ] `package.json` 含 `check:styles` 脚本,且 `build` 脚本已接入该门禁
- [ ] `bomx-reuse-analyzer/styles.css` 无 `:root` 残留,模块页面 CSS 变量取值正常、视觉无回归
- [ ] `npm run check:styles` 退出码 0
- [ ] 首页加载时 Network 面板无任何模块级 CSS chunk
- [ ] 跳转 `supplier-platform`/`wuc-quotation`/`bomx-reuse-analyzer` 时按需加载对应样式且渲染正常、无控制台报错
- [ ] 平台首页与登录页视觉未受模块样式污染
- [ ] `docs/react-module-integration-sop.md` 与 `.trae/skills/react-module-integration/SKILL.md` 已包含 lazy 路由约定与 check:styles 校验说明