/**
 * NPM package bundling for browser consumption.
 *
 * Bundles npm packages installed in VFS node_modules into single ESM files
 * using esbuild-wasm. This replaces esm.sh CDN for packages that are
 * locally installed, giving us full control over resolution (no CDN bugs).
 *
 * React packages are kept external — they continue to load from esm.sh
 * so the entire app shares one React instance.
 */
import type { VirtualFS } from '../virtual-fs';
/**
 * Clear the bundle cache (e.g., after npm install).
 * Pass a VFS to clear only that instance's cache; no-arg clears all.
 */
export declare function clearNpmBundleCache(vfs?: VirtualFS): void;
/**
 * Ensure the esbuild VFS plugin can access our virtual file system.
 * Must be called before bundleNpmModuleForBrowser.
 */
export declare function initNpmServe(vfs: VirtualFS): void;
/**
 * Bundle an npm package from VFS node_modules into a single ESM file.
 *
 * @param specifier - The bare npm specifier (e.g., "@ai-sdk/react", "zod/v4")
 * @param searchRoots - VFS roots whose node_modules are searched, in order
 * @param vfs - VFS to bundle from; falls back to the initNpmServe() instance
 * @returns The bundled ESM code string
 */
export declare function bundleNpmModuleForBrowser(specifier: string, searchRoots?: string[], vfs?: VirtualFS): Promise<string>;
//# sourceMappingURL=npm-serve.d.ts.map