mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #740] Vinext doesn't do code splitting at all #161
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#161
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 @blitss on GitHub (Apr 1, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/740
I'm trying to migrate from opennext, but one issue that stands out is that vinext doesn't do client bundle splitting at all. It produces one large bundle which contains every page, every route, etc.
Is there any way to fix it?
I'm using vite@8 since vite@7 fails build due
Error: vinext: Failed to load @vitejs/plugin-react. at file:///home/codespace/next-frontend/node_modules/vinext/dist/index.js:568:10 { [cause]: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './internal' is not defined by "exports" in /home/codespace/next-frontend/node_modules/vite/package.json imported from /home/codespace/next-frontend/node_modules/@vitejs/plugin-react/dist/index.jsso i cant try itI'm using same setup as in https://github.com/cloudflare/vinext/tree/main/examples/app-router-cloudflare
I've tried patching
@vitejs/plugin-rscand that helped, but I'm not sure if that's reliable patch. Should this be a vite rsc plugin issue? vinext issue?Patch is:
Before (worker-entry is largest bundle):
Build logs
After: