mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #136] [CLOSED] fix(shims): harden jsx-runtime compatibility across remaining shim modules #343
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#343
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/cloudflare/vinext/pull/136
Author: @liuxiaopai-ai
Created: 2/26/2026
Status: ❌ Closed
Base:
main← Head:fix/issue-135-shim-jsx-runtime📝 Commits (1)
609ac24fix(shims): harden jsx-runtime compatibility across shim modules📊 Changes
7 files changed (+85 additions, -1 deletions)
View changed files
📝
packages/vinext/src/shims/document.tsx(+4 -0)📝
packages/vinext/src/shims/form.tsx(+5 -1)📝
packages/vinext/src/shims/image.tsx(+4 -0)📝
packages/vinext/src/shims/legacy-image.tsx(+4 -0)📝
packages/vinext/src/shims/link.tsx(+4 -0)📝
packages/vinext/src/shims/metadata.tsx(+4 -0)➕
tests/jsx-runtime-compat.test.ts(+60 -0)📄 Description
Summary
Follow-up to #45 / #135: harden JSX-runtime compatibility for remaining shim
.tsxmodules that could still depend on named exports fromreact/jsx-runtime.What changed
packages/vinext/src/shims/link.tsxpackages/vinext/src/shims/metadata.tsxpackages/vinext/src/shims/legacy-image.tsxpackages/vinext/src/shims/form.tsxpackages/vinext/src/shims/document.tsxpackages/vinext/src/shims/image.tsxReactdefault import innext/formshim (required for classic JSX transform).tests/jsx-runtime-compat.test.tsthat verifies these shim modules load whenreact/jsx-runtimeandreact/jsx-dev-runtimeonly expose default exports.Why
This closes the gap called out in review on #45: even if
error-boundary.tsxis fixed, other shim modules could still fail under packaging setups wherereact/jsx-runtimenamed exports are not available.Closes #135
Validation
pnpm -s test tests/jsx-runtime-compat.test.ts tests/link.test.ts tests/form.test.ts tests/image-component.test.ts tests/metadata-routes.test.ts tests/shims.test.ts🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.