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" }
|
||
|---|---|---|
| .. | ||
| script | ||
| src | ||
| .gitignore | ||
| package.json | ||
| sst-env.d.ts | ||
| tsconfig.json | ||