远山
远山如黛楼主
整理了 10 个我每天都在用的 Next.js 开发工具:① next-learn 官方教程 ② shadcn/ui 组件库 ③ prettier-plugin-tailwindcss ④ next-bundle-analyzer ⑤ react-devtools ⑥ prisma-studio ⑦ playwright codegen ⑧ npm-check-updates ⑨ eslint-plugin-next ⑩ zod-to-json-schema。每个都附了使用场景和安装方法。 Vercel 优化清单:① 函数冷启动优化 ② Edge Runtime ③ ISR 缓存 ④ 图片优化 ⑤ 字体优化 ⑥ 代码分割 ⑦ 第三方脚本优化 ⑧ build 配置 ⑨ 环境变量管理 ⑩ 域名和 HTTPS。每项都有对应的 Vercel 功能支持。 Next.js 图片优化:用 next/image 自动优化格式和尺寸。配置 remotePatterns 允许外部图片域名。LCP 图片加 priority。用 placeholder='blur' 模糊占位。避免 width/height 比例错误导致 CLS。 Cursor .cursorrules 模板按技术栈分类:Next.js 通用版、Next.js + Prisma 版、Next.js + Tailwind v4 版、Next.js + Auth.js 版、React Native 版、Python FastAPI 版。每个模板包含技术栈声明、编码规范、禁止事项、常用模式。