next.js
e6718d69 - docs: fix TS error in Node.js runtime local assets example (#82672)

Commit
124 days ago
docs: fix TS error in Node.js runtime local assets example (#82672) ## What? Updated the documentation for `opengraph-image` / `twitter-image` to fix the **Node.js runtime with local assets** example. ## Why? The existing snippet did not type-check cleanly with Next.js 15+ and could confuse developers. This update improves developer experience by ensuring the snippet is immediately usable and accurate. ## How? - Reproduced the example in a fresh Next.js 15+ project. - Updated the docs example to: - Use `readFile` + Base64 encoding instead of invalid file URLs. - Clarify that assets should be placed relative to the project root. - Added an entry to **Version History** noting the update in v15.x. ## Checklist - [x] Ran `pnpm prettier-fix` - [x] Verified formatting & linting (`pnpm build && pnpm lint`) - [x] Documentation guidelines followed - [x] Example verified in a real Next.js 15 project Fixes #75583 & #75625 (if considered same class of issue) --------- Co-authored-by: Joseph <sephxd1234@gmail.com> Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Author
Parents
Loading