mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #570] [MERGED] refactor: migrate ssrLoadModule to moduleRunner.import #678
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#678
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/570
Author: @james-elicx
Created: 3/16/2026
Status: ✅ Merged
Merged: 3/17/2026
Merged by: @james-elicx
Base:
main← Head:opencode/gentle-squid📝 Commits (2)
315dabdrefactor: migrate ssrLoadModule to moduleRunner.import0ad4a4frefactor: address bonk review comments📊 Changes
7 files changed (+125 additions, -97 deletions)
View changed files
📝
packages/vinext/src/index.ts(+8 -1)📝
packages/vinext/src/server/api-handler.ts(+6 -6)📝
packages/vinext/src/server/dev-server.ts(+36 -30)📝
packages/vinext/src/server/instrumentation.ts(+15 -0)📝
packages/vinext/src/shims/ALS-ARCHITECTURE.md(+4 -4)📝
tests/api-handler.test.ts(+13 -15)📝
tests/pages-router.test.ts(+43 -41)📄 Description
Summary
server.ssrLoadModule()calls indev-server.tsandapi-handler.tswithrunner.import()via theModuleImporterinterface, following the Vite Module Runner migration guidessrFixStacktrace/ssrRewriteStacktracecalls — these are not needed when using Module Runner APIsindex.tsto pass the existinggetPagesRunner()lazy factory as the newrunnerargumentFiles changed
packages/vinext/src/server/dev-server.tsssrLoadModulecalls →runner.import(),ssrFixStacktraceremoved,runner: ModuleImporteradded tocreateSSRHandlerandrenderErrorPagesignaturespackages/vinext/src/server/api-handler.tsserver: ViteDevServer→runner: ModuleImporter,ssrLoadModule→runner.import(),ssrFixStacktraceremovedpackages/vinext/src/index.tsgetPagesRunner()as the runnertests/api-handler.test.tsMockServertype +mockServer()helper replaced withModuleImporter-shaped mock; removed stalessrFixStacktraceassertiontests/pages-router.test.tscreateSSRHandlercall updated to pass arunnerderived from the existing mock logicTesting
api-handlerunit tests passpnpm run checkis clean (2 pre-existing benchmark errors unrelated to this change)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.