Files
a2fd4ea5c8 Enable server HMR for metadata routes (manifest.ts, robots.ts, etc.) (#93110)
**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]>
2026-04-29 08:22:00 -07:00

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,
}
}