mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[PR #511] [CLOSED] fix: add .js extension to react-reconciler/constants imports for Node.js ESM #588
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#588
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/511
Author: @nathanclevenger
Created: 1/11/2026
Status: ❌ Closed
Base:
main← Head:fix/esm-constants-import📝 Commits (2)
21c251afix: add .js extension to react-reconciler/constants imports for Node.js ESM059af48Merge branch 'main' into fix/esm-constants-import📊 Changes
2 files changed (+2 additions, -2 deletions)
View changed files
📝
packages/react/src/reconciler/host-config.ts(+1 -1)📝
packages/react/src/reconciler/reconciler.ts(+1 -1)📄 Description
Problem
Node.js ESM mode requires explicit file extensions for subpath imports from packages. The current code imports from
react-reconciler/constantswithout the.jsextension, which works in Bun but fails in Node.js:This breaks projects using
@opentui/reactwith Node.js-based test runners like Vitest running in ESM mode.Solution
Add the
.jsextension to the tworeact-reconciler/constantsimports:packages/react/src/reconciler/host-config.tspackages/react/src/reconciler/reconciler.tsThis is backward compatible - the
.jsextension works correctly in both Bun and Node.js.Testing
Tested with Vitest in a pnpm monorepo - the import errors are resolved.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.