/**
 * Set to a directory to write a stats file per compilation, or to `1`/`true` to write them under
 * `<cwd>/bundle-stats`. Off by default: collecting the module graph is not free, and the stats file
 * is far larger than the bundle it describes.
 */
export declare const BUNDLE_STATS_ENV_VAR = "BIT_UI_BUNDLE_STATS";
export declare function bundleStatsDir(): string | undefined;
/**
 * Write an rspack stats file for a finished compilation, for `scripts/analyze-bundle.mjs` to read.
 *
 * Deliberately written outside the output directory: everything under an output dir is matched by
 * the build task's artifact glob, so a stats file placed there would ship inside the package.
 */
export declare function writeBundleStats(stats: any, name: string): string | undefined;
