Files
ai-platform/.trae/specs/isolate-and-lazyload-module-styles/checklist.md
T
2026-10-18 23:02:15 +08:00

13 lines
1.6 KiB
Markdown
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.
# Checklist
- [x] `src/App.tsx` 全部模块组件改为 `React.lazy()` 动态导入,`<Suspense>` 兜底生效
- [x] `npx tsc -b` 类型检查通过
- [x] `npm run build` 成功,`dist/assets` 中每个模块的 CSS 为独立 chunk 文件(8 个 css chunk:主 css 12KB 仅平台样式,wuc 7.8MB、supplier/baode/jieya/welltrust/bomx 各自独立,共享 styles chunk 1 个)
- [x] `scripts/check-module-styles.mjs` 存在且能正确检测 `:root`/`html`/`body`/`*`/裸元素选择器/`@import` 重置,违规时非 0 退出并列出文件+行号(对 git HEAD 存量验证:46 条违规全部检出且行号正确,wuc 7.8MB data URI 零误报)
- [x] `package.json` 含 `check:styles` 脚本,且 `build` 脚本已接入该门禁(`tsc -b && npm run check:styles && vite build`)
- [x] `bomx-reuse-analyzer/styles.css` 无 `:root` 残留,模块页面 CSS 变量取值正常、视觉无回归(浏览器实测浅色 BOM 界面正常渲染)
- [x] `npm run check:styles` 退出码 0(✓ 模块样式检查通过,扫描 12 个文件)
- [x] 首页加载时 Network 面板无任何模块级 CSS chunk(实测仅 /src/index.css)
- [x] 跳转 `supplier-platform`/`wuc-quotation`/`bomx-reuse-analyzer` 时按需加载对应样式且渲染正常、无控制台报错(wuc 6 个样式文件按需加载;另验 jieya-ibp 深色主题正常)
- [x] 平台首页与登录页视觉未受模块样式污染(星空动画、卡片、按钮样式实测正常)
- [x] `docs/react-module-integration-sop.md` 与 `.trae/skills/react-module-integration/SKILL.md` 已包含 lazy 路由约定与 check:styles 校验说明(references 副本同步)