import type { RsbuildPlugin } from '@rsbuild/core'; /** * Resolve the origin (plus path) used to rewrite source-map trailers from a * dev `assetPrefix`. The prefix may be an absolute URL (`http://localhost:/`) * or a path-only public path (`/assets/`). The latter is resolved against a * placeholder base so it doesn't throw, and the placeholder origin is then * dropped so the rewritten trailer stays relative. Returns `undefined` when no * usable prefix can be derived (unparsable, or an empty root path). * * @param assetPrefix - `dev.assetPrefix`, possibly containing a `` token. * @param port - dev-server port substituted for ``. */ export declare function resolveAssetPrefixOrigin(assetPrefix: string, port: number | string): string | undefined; /** * Register `debug-metadata.json` emission for every Lynx template build * and serve sub-field queries via a connect-style dev-server middleware. * * Auto-registered by Rspeedy core. * * The dev-server middleware exposes these endpoints (relative to each * entry's intermediate dir): * * ```text * GET .../debug-metadata.json * GET .../debug-metadata.json?field=source-map&path=… * GET .../debug-metadata.json?field=source-map&filename=… * GET .../debug-metadata.json?field=source-map&key=… * GET .../debug-metadata.json?field=bytecode-debug-info&filename=… * GET .../debug-metadata.json?field=artifact&filename=… * GET .../debug-metadata.json?field=artifacts * GET .../debug-metadata.json?field=ui-source-map * GET .../debug-metadata.json?field=buildInfo * GET .../debug-metadata.json?field=git * GET .../debug-metadata.json?field=rspeedy * * GET .../*.js.map → transparently forwarded to ?field=source-map * GET .../*.css.map → transparently forwarded to ?field=source-map * ``` * * @public */ export declare function pluginLynxDebugMetadata(): RsbuildPlugin;