# package

Package subdomain facade: package.json synthesis + write, generic asset copy, and opt-in third-party license collection.

`runPackagePhase(context, config, formatOutputs)` composes [`synthesizePackageJson`](https://www.hyperfrontend.dev/docs/libraries/builder/package/json/#api-synthesizePackageJson) with the resolved build context, writes the dist `package.json`, materializes the configured [`AssetSpec`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-AssetSpec) list via [`copyAssets`](https://www.hyperfrontend.dev/docs/libraries/builder/package/assets/#api-copyAssets), and, when [`config.thirdPartyLicenses`](https://www.hyperfrontend.dev/docs/libraries/builder/models/#api-BuildConfig-prop-thirdPartyLicenses) is enabled, derives the external dependency list from the synthesized package, runs [`collectThirdPartyLicenses`](https://www.hyperfrontend.dev/docs/libraries/builder/package/licenses/#api-collectThirdPartyLicenses), and emits `THIRD_PARTY_LICENSES.md`. Each step is also exposed as a standalone primitive under the `./package/json`, `./package/assets`, and `./package/licenses` subpaths so wrappers can compose them directly.

---

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