mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
**This PR removes the special-case handling for metadata routes so it benefits from server hmr. It also adds tests.** Previously, metadata routes were excluded from Turbopack's server-side HMR and fell back to a full require-cache eviction on every change. This meant unmodified dependency modules were unnecessarily re-evaluated. Metadata routes use the same app-route.js template and getUserland() per-request getter as regular route handlers, so they can participate in in-place server HMR the same way. Remove the isMetadataRoute() exclusion from the usesServerHmr gate. Test Plan: Added e2e test for testing selective hmr eviction Co-authored-by: Will Binns-Smith <[email protected]> Co-authored-by: Claude <[email protected]>
16 lines
321 B
TypeScript
16 lines
321 B
TypeScript
import { depEvaluatedAt, manifestVersion } from './manifest-dep'
|
|
|
|
let _hmrTrigger = 0
|
|
const manifestEvaluatedAt = Date.now()
|
|
|
|
export default function manifest() {
|
|
return {
|
|
name: manifestVersion,
|
|
short_name: 'v0',
|
|
start_url: '/',
|
|
display: 'standalone',
|
|
depEvaluatedAt,
|
|
manifestEvaluatedAt,
|
|
}
|
|
}
|