import { Plugin } from '../plugin';
import { ViteDevServer } from '../server';
import { OutputBundle } from 'rollup';
import { ResolvedConfig } from '../config';
export declare const isHTMLProxy: (id: string) => boolean;
export declare const htmlCommentRE: RegExp;
export declare const scriptRE: RegExp;
export declare function htmlPlugin(): Plugin;
/**
 * Compiles index.html into an entry js module
 */
export declare function buildHtmlPlugin(config: ResolvedConfig): Plugin;
export interface HtmlTagDescriptor {
    tag: string;
    attrs?: Record<string, string>;
    children?: string | HtmlTagDescriptor[];
    /**
     * default: 'head-prepend'
     */
    injectTo?: 'head' | 'body' | 'head-prepend';
}
export declare type IndexHtmlTransformResult = string | HtmlTagDescriptor[] | {
    html: string;
    tags: HtmlTagDescriptor[];
};
export interface IndexHtmlTransformContext {
    /**
     * public path when served
     */
    path: string;
    /**
     * filename on disk
     */
    filename: string;
    server?: ViteDevServer;
    bundle?: OutputBundle;
}
export declare type IndexHtmlTransformHook = (html: string, ctx: IndexHtmlTransformContext) => IndexHtmlTransformResult | void | Promise<IndexHtmlTransformResult | void>;
export declare type IndexHtmlTransform = IndexHtmlTransformHook | {
    enforce?: 'pre' | 'post';
    transform: IndexHtmlTransformHook;
};
export declare function resolveHtmlTransforms(plugins: readonly Plugin[]): IndexHtmlTransformHook[][];
export declare function applyHtmlTransforms(html: string, path: string, filename: string, hooks: IndexHtmlTransformHook[], server?: ViteDevServer, bundle?: OutputBundle): Promise<string>;
