fix: pack full desktop dependency closure + resolve bun/desktop plugin loading on Windows
Desktop "Local" mode crashed with ERR_MODULE_NOT_FOUND because electron-builder's pnpm collector drops `deduped` subtrees, so engine's transitive closure (@modelcontextprotocol/sdk, pi-ai provider SDKs, etc.) was never packed. Stage the complete flat prod closure with `pnpm deploy --legacy --config.node-linker=hoisted` and package it via `electron-builder --projectDir deploy`, bypassing the lossy collector entirely. Also make the dashboard-imported example plugins loadable under plain Node (the Electron main runtime): cursor/droid/roadmap now expose compiled `dist` on the `import` condition (keeping `source`→src for the bun CLI) and are built during the desktop build. Add `source` conditions to paperclip/agent-browser/even-cards/ even-realities-glasses/whatsapp-chat so the bun `--conditions=source` Windows CLI compile resolves them from source. Validated on macOS: @fusion/core|engine|dashboard import cleanly from the staged deploy; packing yields a complete 705-package asar; bun-windows-x64 cross-compiles with all plugin dist removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"import": "./src/index.ts"
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./probe": {
|
||||
"types": "./src/probe.ts",
|
||||
"import": "./src/probe.ts"
|
||||
"source": "./src/probe.ts",
|
||||
"import": "./dist/probe.js"
|
||||
}
|
||||
},
|
||||
"private": true,
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"import": "./src/index.ts"
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./probe": {
|
||||
"types": "./src/probe.ts",
|
||||
"import": "./src/probe.ts"
|
||||
"source": "./src/probe.ts",
|
||||
"import": "./dist/probe.js"
|
||||
}
|
||||
},
|
||||
"private": true,
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7,15 +7,18 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"import": "./src/index.ts"
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
},
|
||||
"./server": {
|
||||
"types": "./src/server/index.d.ts",
|
||||
"import": "./src/server/index.ts"
|
||||
"source": "./src/server/index.ts",
|
||||
"import": "./dist/server/index.js"
|
||||
},
|
||||
"./roadmap-suggestions": {
|
||||
"types": "./src/roadmap-suggestions.d.ts",
|
||||
"import": "./src/roadmap-suggestions.ts"
|
||||
"source": "./src/roadmap-suggestions.ts",
|
||||
"import": "./dist/roadmap-suggestions.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"source": "./src/index.ts",
|
||||
"import": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user