Path to the RR Vite server build (app-provided)
'production' or 'development'
Optionaloptions: { rrImportHook?: () => Promise<Record<string, unknown>>; serverBuild?: unknown }
Optional override for the react-router import seam
OptionalrrImportHook?: () => Promise<Record<string, unknown>>OptionalserverBuild?: unknownThe app's compiled server build, supplied as a module (M113d §3.10). When present the path import is skipped entirely — the form a bundled Cloudflare Worker uses, where no path can be resolved at runtime.
A promise resolving to the handler and its context factory
Default implementation of
loadRequestHandler.Lazily imports the app-provided server build (
import(serverBuildPath)) and the corereact-routerpackage (import(react-router)), unwraps theServerBuild(default export), then returns a callable request handler.Both the handler and the context-provider factory come from the SAME module object, so the provider instance can never be tested against a different copy of the
RouterContextProviderclass than the one it was constructed from.