热更
热更新选手楼主
Vercel 构建时 TypeScript 检查失败,可以在 next.config.ts 中设置 typescript.ignoreBuildErrors = true 临时跳过,但不推荐。正确做法:本地运行 npm run typecheck 修复所有类型错误后再部署。 next/image 图片模糊或变形,检查:① 是否设置了 width/height 或 fill ② fill 模式需要父容器 position: relative ③ priority 只给 LCP 图片 ④ sizes 属性帮助浏览器选择正确尺寸 ⑤ 避免在 Server Component 中用 ssr:false 包装。 next-intl 翻译键缺失不报错是默认行为。要启用严格模式:在 next-intl 配置中设置 onError 回调,或用 getTranslations 时检查返回值。开发环境建议开启严格模式及早发现缺失键。