From bb1de8a6bdb207601585d29e41805758e8f41f6e Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Wed, 1 Jul 2026 19:34:11 -0700 Subject: [PATCH] fix: add source export condition to hermes/openclaw plugins for bun Windows build The CLI bun `--compile --conditions=source` build could not resolve @fusion-plugin-examples/hermes-runtime and openclaw-runtime (statically imported by dashboard routes.ts): those plugins lacked a `source` export condition and fell through to `import`->dist/index.js, absent on the Windows runner. Add `"source": "./src/index.ts"` (matching core/dashboard/engine/plugin-sdk) so bun bundles their TS source directly, independent of dist. Co-Authored-By: Claude Opus 4.8 (1M context) --- .changeset/fix-bun-windows-cli-plugin-resolution.md | 7 +++++++ plugins/fusion-plugin-hermes-runtime/package.json | 1 + plugins/fusion-plugin-openclaw-runtime/package.json | 1 + 3 files changed, 9 insertions(+) create mode 100644 .changeset/fix-bun-windows-cli-plugin-resolution.md diff --git a/.changeset/fix-bun-windows-cli-plugin-resolution.md b/.changeset/fix-bun-windows-cli-plugin-resolution.md new file mode 100644 index 0000000000..be0cd7c390 --- /dev/null +++ b/.changeset/fix-bun-windows-cli-plugin-resolution.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Fix the Windows CLI binary failing to build in release. +category: fix +dev: The bun `--conditions=source` compile of the CLI could not resolve @fusion-plugin-examples/hermes-runtime and openclaw-runtime (statically imported by dashboard routes.ts) because those plugin packages lacked a `source` export condition and fell through to `import`→`dist/index.js`, which is absent on the Windows runner. Added `"source": "./src/index.ts"` to both plugins' exports (matching @fusion/core|dashboard|engine|plugin-sdk) so bun bundles their TS source directly, independent of dist. Verified locally by cross-compiling bun-windows-x64 with plugin dist removed; a negative control reproduced the exact "Could not resolve" error. diff --git a/plugins/fusion-plugin-hermes-runtime/package.json b/plugins/fusion-plugin-hermes-runtime/package.json index 2c25d92e8c..24ca7c8008 100644 --- a/plugins/fusion-plugin-hermes-runtime/package.json +++ b/plugins/fusion-plugin-hermes-runtime/package.json @@ -12,6 +12,7 @@ "exports": { ".": { "types": "./src/index.ts", + "source": "./src/index.ts", "import": "./dist/index.js" } }, diff --git a/plugins/fusion-plugin-openclaw-runtime/package.json b/plugins/fusion-plugin-openclaw-runtime/package.json index aa80b2e449..b8c66da7c2 100644 --- a/plugins/fusion-plugin-openclaw-runtime/package.json +++ b/plugins/fusion-plugin-openclaw-runtime/package.json @@ -12,6 +12,7 @@ "exports": { ".": { "types": "./src/index.ts", + "source": "./src/index.ts", "import": "./dist/index.js" } },