summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xpackages/opencode/script/build.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts
index 2e3c4ee5c..3edd14b17 100755
--- a/packages/opencode/script/build.ts
+++ b/packages/opencode/script/build.ts
@@ -9,7 +9,9 @@ const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const dir = path.resolve(__dirname, "..")
-const solidPluginPath = path.resolve(dir, "node_modules/@opentui/solid/scripts/solid-plugin.ts")
+// Resolve @opentui/solid package path more robustly using import.meta.resolve
+const solidPackagePath = path.dirname(fileURLToPath(import.meta.resolve("@opentui/solid")))
+const solidPluginPath = path.join(solidPackagePath, "scripts/solid-plugin.ts")
const solidPlugin = (await import(solidPluginPath)).default
process.chdir(dir)