mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
In #67925 we decided not to log any fetches during HMR refreshes (i.e. when editing server components). With this PR, we introduce a new logging config (`logging.fetches.hmrRefreshes`) so that users can opt in to logging of `fetch` requests that are restored from the Server Components HMR cache. <img width="806" alt="hmr cache logs" src="https://github.com/user-attachments/assets/ea789520-8490-479a-a4f0-1febb42388e2">
13 lines
228 B
JavaScript
13 lines
228 B
JavaScript
export default async function Page() {
|
|
await fetch(
|
|
new Request(
|
|
'https://next-data-api-endpoint.vercel.app/api/random?request-input'
|
|
),
|
|
{
|
|
cache: 'no-store',
|
|
}
|
|
)
|
|
|
|
return <h1>Hello World!</h1>
|
|
}
|