From 4fc3fd3bf7f14e2ef3b74dcaccb343edbebe3c4b Mon Sep 17 00:00:00 2001 From: Matt Simpson <7691252+msmps@users.noreply.github.com> Date: Wed, 22 Apr 2026 05:22:15 +0100 Subject: [PATCH] fix(react): correct runtime-plugin-support import path for published package (#962) ## Summary - Fixed `runtime-plugin-support.ts` importing from `../src/index.js` which doesn't exist in the published `dist/` (only `dist/index.js` does) - Changed to `../index.js` to match the pattern `@opentui/solid` already uses - Added root `index.ts` barrel so the import resolves at dev time and tsc can generate declarations Fixes #960 --- packages/react/index.ts | 1 + packages/react/scripts/runtime-plugin-support.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/react/index.ts diff --git a/packages/react/index.ts b/packages/react/index.ts new file mode 100644 index 000000000..6b40174ec --- /dev/null +++ b/packages/react/index.ts @@ -0,0 +1 @@ +export * from "./src/index.js" diff --git a/packages/react/scripts/runtime-plugin-support.ts b/packages/react/scripts/runtime-plugin-support.ts index 4d9a4b8f0..57fa39b66 100644 --- a/packages/react/scripts/runtime-plugin-support.ts +++ b/packages/react/scripts/runtime-plugin-support.ts @@ -4,7 +4,7 @@ import { createRuntimePlugin, type RuntimeModuleEntry } from "@opentui/core/runt import * as reactRuntime from "react" import * as reactJsxRuntime from "react/jsx-runtime" import * as reactJsxDevRuntime from "react/jsx-dev-runtime" -import * as opentuiReactRuntime from "../src/index.js" +import * as opentuiReactRuntime from "../index.js" const runtimePluginSupportInstalledKey = "__opentuiReactRuntimePluginSupportInstalled__"