社恐
社恐患者楼主
最有成就感的是 Core Web Vitals 全绿。LCP 优化用了 next/image + priority + next/font,INP 优化拆分了长任务用 requestIdleCallback,CLS 优化给所有图片设了 width/height。移动端测试用 PageSpeed Insights,持续监控用 Vercel Speed Insights。 数据可视化用 Recharts 做图表,折线图/柱状图/饼图都有。关键:图表组件用 next/dynamic 懒加载(ssr:false),因为 Recharts 依赖浏览器 API。数据获取在 Server Component 完成,通过 props 传给 Client Component 的图表组件。 部署流程:GitHub push → Vercel 自动构建 → Preview 环境 → 合并到 main → Production 环境。环境变量在 Vercel Dashboard 配置,区分 Production/Preview/Development。数据库迁移用 GitHub Actions 在部署前自动执行 prisma migrate deploy。