mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #28] vinext dev fails: cannot find @vitejs/plugin-rsc/rsc + unresolved react-server-dom-webpack/* in optimizeDeps.include #12
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#12
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?
Originally created by @theg1239 on GitHub (Feb 24, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/28
Running vinext dev in a Next 16.1.6 app fails during Vite startup. Vite can’t resolve react-server-dom-webpack/* entries listed in optimizeDeps.include, then throws an internal error because @vitejs/plugin-rsc/rsc can’t be found when importing virtual:vinext-rsc-entry.
After adding vite and @vitejs/plugin-rsc to resolve the missing @vitejs/plugin-rsc/rsc module error, vinext dev now fails during RSC evaluation with DM_Sans is not a function. This happens at app/layout.tsx when calling DM_Sans(...) from next/font/google.
@theg1239 commented on GitHub (Feb 24, 2026):
After reviewing the README's limitations, I realize this is happening because of lightningcss
@theg1239 commented on GitHub (Feb 24, 2026):
I suppose this might be relevant still so reopening
@southpolesteve commented on GitHub (Feb 25, 2026):
We want to make things work! So this is helpful feedback. Thank you. Will investigate lightningcss as a starting point but if you can have AI code up a simple repro that would be very helpful
@ts-76 commented on GitHub (Feb 25, 2026):
I can confirm I'm seeing the same DM_Sans issue on my end too.
From a quick look, packages/vinext/src/shims/font-google.ts only has a small set of static named exports ("common fonts" for IDE autocomplete), and DM_Sans isn’t included — so import { DM_Sans } from "next/font/google" ends up failing.
Quick question on the intended behavior:
For fonts not in the static named export list, is the expected vinext usage to go through the default Proxy (typically via a small app-side wrapper)?
e.g.:
To reduce wrapper overhead and keep runtime + d.ts in sync, could we generate next/font/google named exports from Next.js font definitions/metadata (instead of maintaining the manual list in packages/vinext/src/shims/font-google.ts)?
Sorry if I’m missing something — really enjoying vinext and cheering for the project.
P.S.
If you try installing react-server-dom-webpack, the @vitejs/plugin-rsc/rsc error will be fixed. I have also verified that if you upgrade react / react-dom to version 19.2.4, you don't even need to include react-server-dom-webpack in your root dependencies.
However, even after that, the DM_Sans font error still occurs.
I believe the issue lies with font definitions.
@rafayexalter commented on GitHub (Feb 25, 2026):
npm i -D react-server-dom-webpack