mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
A regression from #88487 1. Make metadata import lazy with `() => require()`, just like for the layout segments 2. Properly await the return value to better handle TLA modules This align with Webpack which does this: <img width="1535" height="509" alt="Bildschirmfoto 2026-03-20 um 11 58 00" src="https://github.com/user-attachments/assets/f2864c86-ccce-4884-8417-c8ae06c05f78" /> Closes PACK-6927 Closes #91700 Closes https://github.com/vercel/next.js/issues/91676
23 lines
465 B
TypeScript
23 lines
465 B
TypeScript
import { ImageResponse } from 'next/og'
|
|
import { getAllSlugs } from '../../data'
|
|
|
|
export default function og() {
|
|
return new ImageResponse(
|
|
(
|
|
<div
|
|
style={{
|
|
width: '100%',
|
|
height: '100%',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
fontSize: 88,
|
|
background: 'lavender',
|
|
}}
|
|
>
|
|
Posts: {getAllSlugs().join(', ')}
|
|
</div>
|
|
)
|
|
)
|
|
}
|