Skip to content

fix(react): support Node ESM imports - #1316

Merged
simonklee merged 2 commits into
anomalyco:mainfrom
neriousy:feat/react-node-import
Aug 2, 2026
Merged

simonklee merged 2 commits into
anomalyco:mainfrom
neriousy:feat/react-node-import

Conversation

@neriousy

Copy link
Copy Markdown
Member

What changed

  • use explicit .js specifiers for react-reconciler/constants
  • add a fresh packed-consumer smoke test for the public React entrypoints on Node 26.4
  • gate React CI and npm release workflows on that distribution test

Why

The published React package currently imports react-reconciler/constants without an extension. Strict Node ESM resolution rejects that specifier with ERR_MODULE_NOT_FOUND, even though Bun resolves it.

This revisits #511 now that Node support landed in #1149.

Validation

  • reproduced the failure against the packed package before the source fix
  • npm exec --yes --package=node@26.4.0 -- bun run test:dist
  • bun run build --ci
  • bun run fmt:check
  • bun run lint:ci

The regression is intentionally an import smoke test. It does not yet claim full Node renderer coverage because the fixture does not pack the platform-native Core artifact.

@neriousy
neriousy marked this pull request as ready for review July 31, 2026 20:15
@simonklee
simonklee enabled auto-merge (squash) August 2, 2026 20:34
@simonklee
simonklee merged commit 23e4941 into anomalyco:main Aug 2, 2026
29 checks passed
carsteneu pushed a commit to carsteneu/opentui that referenced this pull request Aug 20, 2026
- use explicit `.js` specifiers for `react-reconciler/constants`


Co-authored-by: Simon Klee <hello@simonklee.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants