Files
Jiachi LiuandGitHub 063154918c Fix react packages are not bundled for metadata routes (#55579)
`isAppLayer` condition was missing `app-metadata-route` layer, made it
as a util now like other webpack layer utils, add metadata route layer
to the group. Then `React.cache` can be available there.

Also update regex to be compatible across platform

Fixes #55561 
Closes NEXT-1635
2023-09-19 15:45:59 +02:00

17 lines
335 B
TypeScript

import React from 'react'
import { clientRef } from './client-component'
export const contentType = 'image/png'
const cachedNoop = React.cache(() => null)
function noopCall(value) {
return value
}
export default function sitemap() {
// keep the variable from being tree-shaken
noopCall(clientRef)
cachedNoop()
return []
}