# bundle

Bundle subdomain facade: entry-point discovery, externals resolution, Rollup driver, declaration emission, and the orchestrator that runs them in order.

`runBundlePhase(context, config)` walks the per-format configurations on the supplied [`BuildConfig`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-BuildConfig), resolves the matching entry points, drives Rollup once per entry through the appropriate per-format descriptor factory, then calls [`generateDeclarations`](https://www.hyperfrontend.dev/docs/libraries/builder/bundle/declarations/#api-generateDeclarations) to emit `.d.ts` files and runs the closing prune and shared-dedupe passes. The phase returns aggregated [`FormatOutputs`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-FormatOutputs) covering the ESM, CJS, IIFE, and UMD entries it produced; consumers compose this primitive into the larger `build()` facade.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/builder/bundle/
This file: https://www.hyperfrontend.dev/docs/libraries/builder/bundle.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
