RequestHandlerOptions
Server/application integration contract.
Compatibility
ReactServer/build API, not a browser import.
React SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
PreactServer/build API, not a browser import.
Preact SSRAvailable to this renderer's SSR integration; browser event handlers run after hydration.
Import from @kasperrt/smolter/utils/http
Signature
interface RequestHandlerOptions {
build: ServerBuild;
/** Browser entry URL resolved from Vite's production manifest. */
entry: string;
/** Must match the browser and Vite transport endpoint. */
dataEndpoint?: string;
}Contract
This type describes the optional server or Vite integration. See the Express and virtual routes guides for complete usage. It is not a browser runtime dependency.
interface RequestHandlerOptions {
build: ServerBuild;
/** Browser entry URL resolved from Vite's production manifest. */
entry: string;
}Application data endpoint
Data requests use the route pathname plus .__smolter by default, independently of the asset/CDN base. Explicit dataEndpoint retains the legacy ?url= transport and must agree across browser, Vite and production adapters. Reserve the suffix in host routing and apply authentication to document and data requests.
Fields
build
build: ServerBuild;entry
entry: string;Browser entry URL resolved from Vite's production manifest.
dataEndpoint
dataEndpoint?: string;Must match the browser and Vite transport endpoint.