Fix ESM imports for @opencode-ai/plugin (#16916)
parent
94c128f73b
commit
bb232247d0
|
|
@ -1,5 +1,5 @@
|
||||||
import { Plugin } from "./index"
|
import { Plugin } from "./index.js"
|
||||||
import { tool } from "./tool"
|
import { tool } from "./tool.js"
|
||||||
|
|
||||||
export const ExamplePlugin: Plugin = async (ctx) => {
|
export const ExamplePlugin: Plugin = async (ctx) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ import type {
|
||||||
Config,
|
Config,
|
||||||
} from "@opencode-ai/sdk"
|
} from "@opencode-ai/sdk"
|
||||||
|
|
||||||
import type { BunShell } from "./shell"
|
import type { BunShell } from "./shell.js"
|
||||||
import { type ToolDefinition } from "./tool"
|
import { type ToolDefinition } from "./tool.js"
|
||||||
|
|
||||||
export * from "./tool"
|
export * from "./tool.js"
|
||||||
|
|
||||||
export type ProviderContext = {
|
export type ProviderContext = {
|
||||||
source: "env" | "config" | "custom" | "api"
|
source: "env" | "config" | "custom" | "api"
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
"extends": "@tsconfig/node22/tsconfig.json",
|
"extends": "@tsconfig/node22/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"module": "preserve",
|
"module": "nodenext",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "nodenext",
|
||||||
"lib": ["es2022", "dom", "dom.iterable"]
|
"lib": ["es2022", "dom", "dom.iterable"]
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue