fix: use live userland for routing-config reads in AppRouteRouteModule after HMR
In Turbopack dev mode, `this.userland` (set once at construction time from the
static import) was used for `fetchCache`, `dynamic`, and `hasNonStaticMethods`
checks in `handle()`, even though the underlying module may have been replaced
by server HMR. Only the HTTP handler function was already being refreshed via
`_getUserland`.
Resolve the live userland once per request at the top of `handle()` using
`this._getUserland()` when available (Turbopack dev), falling back to the
eagerly-resolved static import otherwise (webpack/production). Use this
`liveUserland` for all three routing-config reads and for the handler function,
so all per-request behavior reflects the current module after HMR.
Remove the now-dead `resolveWithGetter` helper.
Co-Authored-By:
Claude <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment