fix(FN-2139): wire source export condition into CLI builds

- Add "source" export entries for @fusion/core, @fusion/dashboard, and @fusion/engine package exports
- Configure tsup/esbuild to include the "source" condition when resolving workspace dependencies
- Pass --conditions=source to bun compile so compiled CLI binaries resolve source-conditioned exports consistently
This commit is contained in:
Fusion
2026-04-19 05:14:47 -07:00
committed by gsxdsm
parent 59fbdc8dab
commit c5918f386f
5 changed files with 8 additions and 0 deletions

View File

@@ -243,6 +243,7 @@ function compileBinary(outFile: string, target: string, isCrossCompile: boolean)
"--target",
target,
"--minify",
"--conditions=source",
],
cwd: workspaceRoot,
stdout: "inherit",

View File

@@ -27,6 +27,9 @@ export default defineConfig({
format: ["esm"],
platform: "node",
target: "node22",
esbuildOptions(options) {
options.conditions = [...(options.conditions || []), "source"];
},
noExternal: [/^@fusion\//],
splitting: false,
clean: true,

View File

@@ -5,10 +5,12 @@
"exports": {
".": {
"types": "./src/index.ts",
"source": "./src/index.ts",
"import": "./dist/index.js"
},
"./gh-cli": {
"types": "./src/gh-cli.ts",
"source": "./src/gh-cli.ts",
"import": "./dist/gh-cli.js"
}
},

View File

@@ -5,6 +5,7 @@
"exports": {
".": {
"types": "./src/index.ts",
"source": "./src/index.ts",
"import": "./dist/index.js"
},
"./planning": {

View File

@@ -5,6 +5,7 @@
"exports": {
".": {
"types": "./src/index.ts",
"source": "./src/index.ts",
"import": "./dist/index.js"
}
},