next.js
a2fd4ea5 - Enable server HMR for metadata routes (manifest.ts, robots.ts, etc.) (#93110)

Commit
140 days ago
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 <wbinnssmith@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Author
Parents
Loading