Fix ESM imports for @opencode-ai/plugin (#16916)

This commit is contained in:
Dax 2026-03-10 13:11:36 -04:00 committed by GitHub
parent 94c128f73b
commit bb232247d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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