UriBundleResolver
Options for resolving the bundle name from the request uri.
Options for resolving the bundle name from the request uri.
hostname: from the uri hostname.segment- Hostname segment to use, or the nth segment (default: 'first')allowWvbSuffixOnly- Only resolve hosts ending in.wvb(default: false)
pathname: from the uri pathname.segmentIndex- Path segment index, 0-based over non-empty segments (default: 0)
Type
type UriBundleResolver = { allowWvbSuffixOnly?: boolean; segment?: HostnameSegment | number; type: "hostname" } | { segmentIndex?: number; type: "pathname" };Examples
// `https://app.wvb/index.html` -> bundle "app"
const byHostname: UriBundleResolver = { type: 'hostname' };
// `https://cdn.example.com/my-app/index.html` -> bundle "my-app"
const byPathname: UriBundleResolver = { type: 'pathname', segmentIndex: 0 };