1 | import { ComponentType } from 'react';
|
2 | import { RouteLoader } from './route-loader';
|
3 | export declare type StyleSheetTuple = {
|
4 | href: string;
|
5 | text: string;
|
6 | };
|
7 | export declare type GoodPageCache = {
|
8 | page: ComponentType;
|
9 | mod: any;
|
10 | styleSheets: StyleSheetTuple[];
|
11 | };
|
12 | export default class PageLoader {
|
13 | private buildId;
|
14 | private assetPrefix;
|
15 | private promisedSsgManifest?;
|
16 | private promisedDevPagesManifest?;
|
17 | routeLoader: RouteLoader;
|
18 | constructor(buildId: string, assetPrefix: string);
|
19 | getPageList(): any;
|
20 | /**
|
21 | * @param {string} href the route href (file-system path)
|
22 | * @param {string} asPath the URL as shown in browser (virtual path); used for dynamic routes
|
23 | * @returns {string}
|
24 | */
|
25 | getDataHref(href: string, asPath: string, ssg: boolean, locale?: string | false): string;
|
26 | |
27 |
|
28 |
|
29 | _isSsg(route: string): Promise<boolean>;
|
30 | loadPage(route: string): Promise<GoodPageCache>;
|
31 | prefetch(route: string): Promise<void>;
|
32 | }
|