UNPKG

921 BTypeScriptView Raw
1import { IncomingMessage, ServerResponse } from 'http';
2import { webpack } from 'next/dist/compiled/webpack/webpack';
3export declare const ADDED: unique symbol;
4export declare const BUILDING: unique symbol;
5export declare const BUILT: unique symbol;
6export declare let entries: {
7 [page: string]: {
8 serverBundlePath: string;
9 clientBundlePath: string;
10 absolutePagePath: string;
11 status?: typeof ADDED | typeof BUILDING | typeof BUILT;
12 lastActiveTime?: number;
13 };
14};
15export default function onDemandEntryHandler(watcher: any, multiCompiler: webpack.MultiCompiler, { pagesDir, pageExtensions, maxInactiveAge, pagesBufferLength, }: {
16 pagesDir: string;
17 pageExtensions: string[];
18 maxInactiveAge: number;
19 pagesBufferLength: number;
20}): {
21 ensurePage(page: string): Promise<void>;
22 middleware(req: IncomingMessage, res: ServerResponse, next: Function): any;
23};