-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[email protected] breaks deployment #13300
Comments
As of [email protected], SvelteKit no longer uses esbuild to bundle the build. This is because Cloudflare's Wrangler also bundles the worker code when you try to deploy the project. We don't want to duplicate the bundling process so we let Cloudflare handle it instead (less error prone). You should probably adjust your project's GitHub workflows to upload/download the entire |
@eltigerchino I tried again including the entire build output (intially when I opened the issue I included only the As you can see in this run: https://github.com/trakt/trakt-lite/actions/runs/12756619076/job/35555130981#step:5:72 Publishing these binaries result in cloudflare erroring on external dependencies, I've temporarily reverted the upgrade (again) trakt/trakt-lite#277. |
I forgot, you probably need to have your |
@eltigerchino this sort of defeats the purpose of a deployment pipeline. We build our artifacts and deploy later (could be arbitrary time later...). From where I come from a build artifact is deployable at any point in time... |
So I've been thinking, I can understand you guys want to skip the build step (conceptually) but then I believe that the adapter should at a minimum:
Also can we please re-open this issue @eltigerchino I don't see this as resolved 😕 |
I have the same issue. I understand that some build task is now moved for wrangler, but in that case could wrangler provide a tool to bundle the build into a single package/dist folder, etc. ? A self contained artifact is quite essential for many pipelines where a (tested) artifact can be deployed any time (to any compatible environment). |
It's possible to compile the As a workaround for now, you could install # bundles the worker to a temp directory then copies it over to .svelte-kit/cloudflare
vite build && wrangler deploy ./.svelte-kit/cloudflare/_worker.js --dry-run --outdir ./.svelte-kit/cloudflare-tmp --name worker --compatibility-date 2025-02-03 && cp ./.svelte-kit/cloudflare-tmp/_worker.js ./.svelte-kit/cloudflare/_worker.js #13072 is related as that removes the custom bundle step too |
Describe the bug
After upgrading to
@sveltejs/[email protected]
deployments no longer work, the./.svelte-kit/cloudflare
now depends on./.svelte-kit/output
and cannot resolve external dependencies. (in my case@ts-rest/core
).Reproduction
Deployment using only
./.svelte-kit/cloudflare
binaries: https://github.com/trakt/trakt-lite/actions/runs/12734910219/job/35493024100#step:5:68Deployment with
./.svelte-kit/output
unpacked: https://github.com/trakt/trakt-lite/actions/runs/12735478470/job/35494291485#step:6:68Deployment with
@sveltejs/[email protected]
output: https://github.com/trakt/trakt-lite/actions/runs/12735605634/job/35494549765#step:5:67Logs
No response
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: