diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 3931f5b7ca00..84b042de2c49 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" + ".": { + "import": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./tool": { + "import": "./dist/tool.js", + "types": "./dist/tool.d.ts" + } }, "files": [ "dist" diff --git a/packages/plugin/src/example.ts b/packages/plugin/src/example.ts index 94745a37b739..1cf042fe967d 100644 --- a/packages/plugin/src/example.ts +++ b/packages/plugin/src/example.ts @@ -1,5 +1,5 @@ -import { Plugin } from "./index" -import { tool } from "./tool" +import { Plugin } from "./index.js" +import { tool } from "./tool.js" export const ExamplePlugin: Plugin = async (ctx) => { return { diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index e57eff579e63..2ed17b8f63f3 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -12,10 +12,10 @@ import type { Config, } from "@opencode-ai/sdk" -import type { BunShell } from "./shell" -import { type ToolDefinition } from "./tool" +import type { BunShell } from "./shell.js" +import { type ToolDefinition } from "./tool.js" -export * from "./tool" +export * from "./tool.js" export type ProviderContext = { source: "env" | "config" | "custom" | "api"