Skip to content

fix(deploy): resolve hosted framework bundles with Worker conditions - #592

Merged
cpojer merged 1 commit into
voidzero-dev:mainfrom
magurotuna:fix/422-bundle-entry-conditions
Oct 26, 2026
Merged

cpojer merged 1 commit into
voidzero-dev:mainfrom
magurotuna:fix/422-bundle-entry-conditions

Conversation

@magurotuna

Copy link
Copy Markdown
Member

Fixes #422

bundleEntry bundles the SvelteKit Worker again for --platform void with a plain Vite lib build. That build used Vite's default client conditions, so dependencies resolved to their browser exports: @sentry/sveltekit failed to build, and postgres built but picked its Node build.

#540 fixed the same problem for --platform cloudflare in prepareBundledBuildOutput. bundleEntry now uses the same conditions: WORKER_CONDITIONS plus production. production is fixed rather than taken from NODE_ENV, because a deploy bundle is always a production build.

The module rules part of #540 (.wasm, .txt, .bin, …) is not covered here (see #535).

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@cpojer
cpojer merged commit 233a0f7 into voidzero-dev:main Oct 26, 2026
16 of 18 checks passed
@magurotuna
magurotuna deleted the fix/422-bundle-entry-conditions branch October 26, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SvelteKit deploy: the framework Worker packager resolves external packages with browser conditions, so @sentry/sveltekit fails to bundle

2 participants