mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #216] [CLOSED] fix: Module doesn't provide an export named: 'jsx' #395
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#395
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/216
Author: @edwinvakayil
Created: 3/1/2026
Status: ❌ Closed
Base:
main← Head:fix/react-jsx-runtime📝 Commits (2)
deb5245fix: Module doesn't provide an export named: 'jsx'07252abfix: Module doesn't provide an export named: 'jsx'📊 Changes
5 files changed (+191 additions, -14 deletions)
View changed files
📝
README.md(+2 -0)📝
packages/vinext/src/cli.ts(+10 -1)📝
packages/vinext/src/index.ts(+41 -0)📝
packages/vinext/src/server/prod-server.ts(+34 -7)📝
tests/app-router.test.ts(+104 -6)📄 Description
Fix dev JSX runtime error and vinext start RSC entry handling
Dev:
react/jsx-runtimedoesn't provide an export namedjsxRoot optimizeDeps.include now forces pre-bundling of
react,react-dom,react/jsx-runtime, andreact/jsx-dev-runtimeso the automatic JSX transform always resolves to a React copy that exports jsx (React 17+). Avoids the error when resolution or a duplicate React would otherwise use an older or wrong copy. README “Known limitations” documents the fix and suggests clearingnode_modules/.viteand ensuring a single React 19 install if the error persists.vinext start: RSC entry does not export a default handler functionThe prod server now accepts both RSC entry shapes: a default function
(request) => Promise<Response>(raw RSC entry from build) and a default object{ fetch(request) }(Workers-style entry). It uses the function when present, otherwise callsdefault.fetch(request).vinext startworks aftervinext buildwhether the builtdist/server/index.jsis the raw RSC entry or the Workers entry. Includes a unit test that starts the prod server with a fake entry exporting{ fetch }and asserts the response.Resolves #143
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.