UNPKG

@platform/react.ssr

Version:

A lightweight SSR (server-side-rendering) system for react apps bundled with ParcelJS and hosted on S3.

36 lines (35 loc) 821 B
import { t } from '../common'; export declare type IRouteArgs = { site: t.ISiteManifest; route: t.ISiteManifestRoute; }; declare type IEntry = { ok: boolean; status: number; url: string; html: string; }; export declare class Route { static format(args: { input: any; }): t.ISiteManifestRoute | undefined; static create: (args: IRouteArgs) => Route; private constructor(); private readonly site; private readonly def; private _entry; private _regexps; readonly paths: string[]; readonly version: string; readonly bundleUrl: string; entry(args?: { force?: boolean; }): Promise<IEntry>; isMatch(path: string): boolean; toObject(): { entry: string; path: string[]; }; private formatHtml; } export {};