mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[PR #1005] [CLOSED] fix: use bare specifier imports for shims to fix @vitejs/plugin-rsc compatibility #1018
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#1018
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/1005
Author: @Divkix
Created: 5/1/2026
Status: ❌ Closed
Base:
main← Head:fix/shim-imports-1001📝 Commits (2)
0960106fix: use bare specifier imports for shims to fix @vitejs/plugin-rsc compatibility (#1001)1a1f718fix: use bare specifiers for all server imports to fix #1001📊 Changes
54 files changed (+263 additions, -181 deletions)
View changed files
📝
packages/vinext/package.json(+4 -0)📝
packages/vinext/src/build/prerender.ts(+2 -2)📝
packages/vinext/src/client/vinext-next-data.ts(+1 -1)📝
packages/vinext/src/cloudflare/kv-cache-handler.ts(+5 -2)📝
packages/vinext/src/config/next-config.ts(+2 -2)📝
packages/vinext/src/server/api-handler.ts(+6 -2)📝
packages/vinext/src/server/app-browser-entry.ts(+8 -8)📝
packages/vinext/src/server/app-browser-state.ts(+3 -3)📝
packages/vinext/src/server/app-middleware.ts(+6 -6)📝
packages/vinext/src/server/app-page-boundary-render.ts(+12 -12)📝
packages/vinext/src/server/app-page-boundary.ts(+2 -2)📝
packages/vinext/src/server/app-page-cache.ts(+2 -2)📝
packages/vinext/src/server/app-page-execution.ts(+2 -2)📝
packages/vinext/src/server/app-page-head.ts(+5 -5)📝
packages/vinext/src/server/app-page-method.ts(+2 -2)📝
packages/vinext/src/server/app-page-params.ts(+1 -1)📝
packages/vinext/src/server/app-page-probe.ts(+1 -1)📝
packages/vinext/src/server/app-page-render.ts(+7 -7)📝
packages/vinext/src/server/app-page-request.ts(+1 -1)📝
packages/vinext/src/server/app-page-response.ts(+1 -1)...and 34 more files
📄 Description
Fixes #1001
Summary
Problem
vinext's internal modules were using relative imports like '../shims/X.js' which broke @vitejs/plugin-rsc's client-in-server-package-proxy. The plugin only tracks bare specifier imports (like 'vinext/shims/X') for its packageSource map.
When relative imports were used, the plugin fell back to generating a proxy module with absolute filesystem paths, which then failed to resolve against the package's exports field.
Test Plan
Notes
Type checking has some issues due to mixed resolution (src/ vs dist/) but this doesn't affect the runtime behavior or the build output. The fix correctly addresses the issue described in #1001.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.