mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What Fix bad detection of dynamic route of sitemap metadata route, the swc AST check should process when the text are detected. But prevuious if there's text with `generateSitemap` such as comment but not the actual export it will fail. ### How Add both checks on metadata loader side and detection helper side * Only call `generateSitemaps` helper when the export existed * Fix the helper detection logic (major part of this PR) Fixes #59698 Closes #60344 Closes NEXT-2007
25 lines
471 B
TypeScript
25 lines
471 B
TypeScript
import { ImageResponse } from 'next/og'
|
|
|
|
export const alt = 'Open Graph'
|
|
|
|
/* without generateImageMetadata */
|
|
export default function og() {
|
|
return new ImageResponse(
|
|
(
|
|
<div
|
|
style={{
|
|
width: '100%',
|
|
height: '100%',
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
fontSize: 128,
|
|
background: 'lavender',
|
|
}}
|
|
>
|
|
Open Graph
|
|
</div>
|
|
)
|
|
)
|
|
}
|