Skip to content

Commit 7417e6e

Browse files
R44VC0RPthdxr
authored andcommitted
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" }
1 parent 5db0890 commit 7417e6e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

packages/plugin/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@
99
"build": "tsc"
1010
},
1111
"exports": {
12-
".": "./src/index.ts",
13-
"./tool": "./src/tool.ts"
12+
".": {
13+
"types": "./dist/index.d.ts",
14+
"import": "./dist/index.js"
15+
},
16+
"./tool": {
17+
"types": "./dist/tool.d.ts",
18+
"import": "./dist/tool.js"
19+
}
1420
},
1521
"files": [
1622
"dist"

0 commit comments

Comments
 (0)