UNPKG

@alloc/html-bundle

Version:

Bundle your HTML assets with Esbuild and LightningCSS. Custom plugins, HMR platform, and more.

47 lines (46 loc) 1.92 kB
/// <reference types="node" /> /// <reference types="node" /> import { Node } from '@web/parse5-utils'; import chokidar from 'chokidar'; import { EventEmitter } from 'events'; import { Flags } from './bundle.mjs'; import { Plugin } from './plugin.mjs'; export declare function loadBundleConfig(flags: Flags): Promise<{ src: string; build: string; assets: string; copy: (string | Record<string, string>)[]; browsers: string; server: { url: URL; port: number; https?: { cert?: string | undefined; key?: string | undefined; } | undefined; }; esbuild: import("esbuild").BuildOptions & { define: Record<string, string>; }; lightningCss: any; htmlMinifierTerser: import("html-minifier-terser").Options; isCritical: boolean; deletePrev: boolean; plugins: import("./plugin.mjs").PluginInstance[]; events: EventEmitter; virtualFiles: Record<string, Plugin.VirtualFile>; getBuildPath: (file: string) => string; resolve: (id: string, importer?: string | URL | undefined) => URL; resolveDevUrl: (id: string, importer?: string | URL | undefined) => URL; webext?: import("../config.mjs").WebExtension.Config | undefined; watcher?: chokidar.FSWatcher | undefined; }>; export declare function createDir(file: string): Promise<string | undefined>; export declare function toArray<T>(value: T | T[]): T[]; export declare function resolveHome(file: string): string; export declare function resolveHome(file: string | undefined): string | undefined; export declare function baseRelative(file: string): string; export declare function relative(from: string, to: string): string; export declare function findExternalScripts(rootNode: Node): import("parse5").Element[]; export declare function findFreeTcpPort(): Promise<number>; export declare function lowercaseKeys<T extends object>(obj: T): T;