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" }
This commit is contained in:
R44VC0RP
2026-01-30 16:13:27 -05:00
committed by Dax Raad
parent 5db089070a
commit 7417e6eb38

View File

@@ -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"