summaryrefslogtreecommitdiffhomepage
path: root/packages/plugin
diff options
context:
space:
mode:
authorR44VC0RP <[email protected]>2026-01-30 16:13:27 -0500
committerDax Raad <[email protected]>2026-02-01 19:26:23 -0500
commit7417e6eb38e96c5e3904a4503740a305475d154a (patch)
tree54cb0da592cf91efb39bce1adf839b23a0e6fa0c /packages/plugin
parent5db089070a24d66063f55d4f5baf0da20883daf9 (diff)
downloadopencode-7417e6eb38e96c5e3904a4503740a305475d154a.tar.gz
opencode-7417e6eb38e96c5e3904a4503740a305475d154a.zip
fix(plugin): correct exports to point to dist instead of src
The package.json exports were pointing to ./src/*.ts but the published package only includes the dist/ folder. This caused 'Cannot find module' errors when custom tools tried to import @opencode-ai/plugin. Changed exports from: ".": "./src/index.ts" "./tool": "./src/tool.ts" To: ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } "./tool": { "types": "./dist/tool.d.ts", "import": "./dist/tool.js" }
Diffstat (limited to 'packages/plugin')
-rw-r--r--packages/plugin/package.json10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/plugin/package.json b/packages/plugin/package.json
index 5a4afbae4..160ce6a82 100644
--- a/packages/plugin/package.json
+++ b/packages/plugin/package.json
@@ -9,8 +9,14 @@
"build": "tsc"
},
"exports": {
- ".": "./src/index.ts",
- "./tool": "./src/tool.ts"
+ ".": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.js"
+ },
+ "./tool": {
+ "types": "./dist/tool.d.ts",
+ "import": "./dist/tool.js"
+ }
},
"files": [
"dist"