summaryrefslogtreecommitdiffhomepage
path: root/packages/plugin
diff options
context:
space:
mode:
authorDax <[email protected]>2026-03-10 13:11:36 -0400
committerGitHub <[email protected]>2026-03-10 13:11:36 -0400
commitbb232247d094b22d497a036c21d4c4a722700a38 (patch)
tree27c4e2ccf625a42c8dc8cd18cc50ec39bff9399b /packages/plugin
parent94c128f73b05bb4b14134974d9db8eb7eb671b92 (diff)
downloadopencode-bb232247d094b22d497a036c21d4c4a722700a38.tar.gz
opencode-bb232247d094b22d497a036c21d4c4a722700a38.zip
Fix ESM imports for @opencode-ai/plugin (#16916)
Diffstat (limited to 'packages/plugin')
-rw-r--r--packages/plugin/src/example.ts4
-rw-r--r--packages/plugin/src/index.ts6
-rw-r--r--packages/plugin/tsconfig.json4
3 files changed, 7 insertions, 7 deletions
diff --git a/packages/plugin/src/example.ts b/packages/plugin/src/example.ts
index 94745a37b..1cf042fe9 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 76370d1d5..b78bcae17 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"
diff --git a/packages/plugin/tsconfig.json b/packages/plugin/tsconfig.json
index 58072c81c..117381878 100644
--- a/packages/plugin/tsconfig.json
+++ b/packages/plugin/tsconfig.json
@@ -3,9 +3,9 @@
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"outDir": "dist",
- "module": "preserve",
+ "module": "nodenext",
"declaration": true,
- "moduleResolution": "bundler",
+ "moduleResolution": "nodenext",
"lib": ["es2022", "dom", "dom.iterable"]
},
"include": ["src"]