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:
@@ -9,8 +9,14 @@
|
|||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
},
|
},
|
||||||
"exports": {
|
"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": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
|
|||||||
Reference in New Issue
Block a user