Skip to content
Discussion options

You must be logged in to vote

I was able to reproduce this with the current example. The important detail is that this is not fixed by ClientOnly or by moving the call into useEffect: those change rendering/runtime, but Vite still emits the client-only dynamic-import branch during the SSR build.

With @cloudflare/vite-plugin@1.52.1, Vite 7.3.2, and Wrangler 4.123.0, the generated server output has no PowerSync entries in dist/server/.vite/manifest.json, and the server chunks do not reference PowerSync. Nevertheless, the Cloudflare-generated config uses:

"rules": [{ "type": "ESModule", "globs": ["**/*.js", "**/*.mjs"] }],
"no_bundle": true

That makes Wrangler scan every JS module under dist/server, including the orphan …

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rossknudsen
Comment options

You must be logged in to vote
1 reply
@rossknudsen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants