UNPKG

zephyr-xpack-internal

Version:

Xpack internals for Zephyr

42 lines • 1.43 kB
import type { ZephyrEngine } from 'zephyr-agent'; /** Interface for options that might contain baseHref settings */ export interface BaseHrefOptions { baseHref?: string; publicPath?: string; } /** Options that might be passed to HTML Webpack Plugin */ export interface HtmlPluginOptions { base?: string | { href?: string; target?: string; }; } /** Interface for webpack/rspack compiler */ export interface WebpackLikeCompiler { options: { output?: { publicPath?: any; }; plugins?: any[]; }; } /** * Extracts baseHref from available sources with priority: * * 1. Plugin options * 2. HTML Plugin * 3. Output.publicPath * * @param zephyr_engine - ZephyrEngine instance * @param compiler - The webpack/rspack compiler object * @param pluginOptions - Options passed to the plugin */ export declare function detectAndStoreBaseHref(zephyr_engine: ZephyrEngine, compiler: WebpackLikeCompiler, pluginOptions?: BaseHrefOptions): void; /** * Detect a compiler's application base without mutating shared engine state. * * Coordinated compiler adapters use this pure form so the coordinator can validate every * child before selecting the one application-wide snapshot base. */ export declare function detectBaseHref(compiler: WebpackLikeCompiler, pluginOptions?: BaseHrefOptions): string | undefined; //# sourceMappingURL=basehref-integration.d.ts.map