[PR #416] use packages=external in build scripts #1298

Open
opened 2026-03-14 09:29:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/416
Author: @remorses
Created: 12/14/2025
Status: 🔄 Open

Base: mainHead: fix/core-external-deps


📝 Commits (2)

  • 2f76de1 use packages=external in build scripts
  • 934413c Merge remote-tracking branch 'upstream/main' into fix/core-external-deps

📊 Changes

3 files changed (+7 additions, -23 deletions)

View changed files

📝 packages/core/scripts/build.ts (+5 -11)
📝 packages/react/scripts/build.ts (+1 -6)
📝 packages/solid/scripts/build.ts (+1 -6)

📄 Description

Build scripts were manually listing dependencies to externalize, but core was missing regular dependencies (only had optionalDependencies and peerDependencies). This caused deps like yoga-layout, diff, jimp, and bun-ffi-structs to be bundled into dist.

Switched all packages to use Bun's packages: "external" option which automatically externalizes all npm imports.

Tested compiling examples to standalone binaries with bun build --compile - yoga-layout WASM and other dependencies are still bundled correctly by Bun at compile time.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/416 **Author:** [@remorses](https://github.com/remorses) **Created:** 12/14/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/core-external-deps` --- ### 📝 Commits (2) - [`2f76de1`](https://github.com/anomalyco/opentui/commit/2f76de1e113ed76f08155a1fc2bcb733ac6c0669) use packages=external in build scripts - [`934413c`](https://github.com/anomalyco/opentui/commit/934413cd13d5b9cba1afdb6bfce01efc1b1a1136) Merge remote-tracking branch 'upstream/main' into fix/core-external-deps ### 📊 Changes **3 files changed** (+7 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/scripts/build.ts` (+5 -11) 📝 `packages/react/scripts/build.ts` (+1 -6) 📝 `packages/solid/scripts/build.ts` (+1 -6) </details> ### 📄 Description Build scripts were manually listing dependencies to externalize, but core was missing regular `dependencies` (only had `optionalDependencies` and `peerDependencies`). This caused deps like `yoga-layout`, `diff`, `jimp`, and `bun-ffi-structs` to be bundled into dist. Switched all packages to use Bun's `packages: "external"` option which automatically externalizes all npm imports. Tested compiling examples to standalone binaries with `bun build --compile` - yoga-layout WASM and other dependencies are still bundled correctly by Bun at compile time. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1298
No description provided.