mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
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#1017
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/1006
Author: @Divkix
Created: 5/1/2026
Status: ✅ Merged
Merged: 5/2/2026
Merged by: @james-elicx
Base:
main← Head:fix/1001-relative-shim-imports📝 Commits (3)
823c67dfix: replace relative shim imports with bare specifier vinext/shims/X (#1001)343ef9ffix: address review feedback for relative shim imports (#1006)58079eareplace test with oxlint plugin📊 Changes
40 files changed (+355 additions, -77 deletions)
View changed files
➕
oxlint-plugins/prefer-import-alias.js(+251 -0)📝
packages/vinext/src/build/prerender.ts(+2 -2)📝
packages/vinext/src/cache.ts(+1 -1)📝
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/global.d.ts(+1 -1)📝
packages/vinext/src/index.ts(+1 -1)📝
packages/vinext/src/server/app-browser-entry.ts(+3 -3)📝
packages/vinext/src/server/app-browser-state.ts(+2 -2)📝
packages/vinext/src/server/app-middleware.ts(+2 -2)📝
packages/vinext/src/server/app-page-boundary-render.ts(+4 -4)📝
packages/vinext/src/server/app-page-cache.ts(+1 -1)📝
packages/vinext/src/server/app-page-dispatch.ts(+5 -5)📝
packages/vinext/src/server/app-page-head.ts(+1 -1)📝
packages/vinext/src/server/app-page-render.ts(+1 -1)📝
packages/vinext/src/server/app-page-route-wiring.tsx(+4 -4)📝
packages/vinext/src/server/app-prerender-endpoints.ts(+1 -1)📝
packages/vinext/src/server/app-prerender-static-params.ts(+1 -1)📝
packages/vinext/src/server/app-route-handler-cache.ts(+1 -1)...and 20 more files
📄 Description
Fixes #1001
Summary
from "../shims/X.js"imports across 34 source files to use the package's bare specifierfrom "vinext/shims/X".tsconfigpathsmapping so TypeScript resolves shim types to source (avoids type mismatch betweendist/andsrc/module graphs for type checking)resolve.aliasforvinext/shims→ source (prevents separate module graph instances in unit tests without the full RSC plugin)./dist/shims/*.jsand./dist/shims/internal/*.jsto package.json exports as a safety net for absolute-path resolutiontests/shim-imports.test.tsthat asserts no relative shim imports exist in sourceRoot cause
@vitejs/plugin-rsc'spackageSourcestracking only fires for bare specifier imports. Relative imports ("../shims/slot.js") never populate the map, so the RSC plugin takes a broken fallback path that generates absolute filesystem paths — which fail against the package'sexportsfield gate in standard Vite 8.Test plan
tests/shim-imports.test.ts— scans all source files for relative shim imports, verified to catch all 67 instances before the fixpages-router.test.tsunrelated to this change)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.