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:
@@ -243,6 +243,7 @@ function compileBinary(outFile: string, target: string, isCrossCompile: boolean)
|
||||
"--target",
|
||||
target,
|
||||
"--minify",
|
||||
"--conditions=source",
|
||||
],
|
||||
cwd: workspaceRoot,
|
||||
stdout: "inherit",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./planning": {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user