Repository navigation
fix(dev): prebundle Void runtime deps the scanner cannot reach - #1035
Draft
TheAlexLichter wants to merge 1 commit into
Draft
TheAlexLichter wants to merge 1 commit into
TheAlexLichter wants to merge 1 commit into
Conversation
|
Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.
Updated: |
This comment has been minimized.
This comment has been minimized.
TheAlexLichter
force-pushed
the
fix/prebundle-void-runtime-deps
branch
from
December 4, 2026 15:04
36722a9 to
88883a0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cold
vp devof a Cloudflare app with a linkedvoid(this workspace or a monorepo) found Void's own runtime dependencies during the first request. Each one reloaded the Worker:That's because Vite's dependency scanner never reaches Void's runtime. The generated
.void/entry.tsimports the routing runtime by absolute path, which the scanner treats as external. The virtual route table is skipped too, andvoid/*imports from app code stop atexclude: ['void']. So runtime deps are only prebundled when listed by hand, and that list was out of date.This PR
The Worker's
optimizeDeps.includeis now built from three groups:devalue,hono,hono/routeandhono/utils/url.void/liveor WebSocket routes:hono/http-exception.drizzle-orm/sqlite-core,pg-coreormysql-core, matching the dialect.The flags come from the existing app analysis, so apps without those features get none of the extra prebundles. The shared Pages plugin adds a dev-only client include for
void > devalue, which covers React, Vue, Svelte and Solid.Everything added is a dependency of
void, so it's always installed.Limits
better-auth/clientlate on the client but without a reload.void/ws/serverwithout a.ws.tsroute still findshono/http-exceptionlate.