mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
`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
17 lines
335 B
TypeScript
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 []
|
|
}
|