@platform/react.ssr
Version:
A lightweight SSR (server-side-rendering) system for react apps bundled with ParcelJS and hosted on S3.
70 lines (69 loc) • 1.45 kB
TypeScript
/// <reference types="react" />
export declare type IS3Config = {
endpoint: string;
accessKey: string;
secret: string;
};
export declare type IBundleManifest = {
version: string;
createdAt: number;
bytes: number;
size: string;
entries: IBundleEntryHtml[];
files: IBundleFile[];
};
export declare type IBundleEntryHtml = {
id: string;
file: string;
html: string;
css: string;
};
export declare type IBundleEntryElement = {
file: string;
el: JSX.Element;
id?: string;
};
export declare type IBundleFile = {
path: string;
bytes: number;
};
export declare type IManifest = {
sites: ISiteManifest[];
};
export declare type ISiteManifest = {
name: string;
domain: string[];
bundle: string;
routes: {
[key: string]: ISiteManifestRoute;
};
size: string;
bytes: number;
baseUrl: string;
files: IBundleFile[];
entries: IBundleEntryHtml[];
};
export declare type ISiteManifestRoute = {
entry: string;
path: string[];
};
export declare type ISsrConfig = {
manifest: string;
secret: string;
builder: {
bundles: string;
entries: string;
};
s3: {
endpoint: string;
cdn?: string;
accessKey: string;
secret: string;
bucket: string;
path: {
base: string;
manifest: string;
bundles: string;
};
};
};