@joker.front/cli
Version:
The Next-Generation Front-End Toolchain: Swift, Efficient, and Adaptive.
19 lines (18 loc) • 611 B
TypeScript
import { Server } from "..";
import type { NextFunction } from "connect";
import type * as http from "node:http";
/**
* 首页html处理中间件
*/
export declare class IndexHtmlMiddleware {
protected server: Server;
constructor(server: Server);
indexHtml(req: http.IncomingMessage, res: http.ServerResponse, next: NextFunction): Promise<void>;
private getHtmlFilePath;
private transformIndexHtml;
private transformResouceUrl;
/**
* 将页面script内嵌执行代码,转换为esm模式,并替换内容,转换到一个地址请求
*/
private addInlineModule;
}