-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Astro + Svelte + Cloudflare] Cannot build Svelte component that contains $onMount() with Cloudflare adapter #485
Comments
Seeing the same thing. It also fails when using Previously this error was caused because the Vite resolve conditions were including Unfortunately this did not fix the Svelte issue, as it introduced the |
Can you try Svelte 5.15.0 in your project if it fixes the issue? I've sent a change to add the worker condition, so it should work better now. If it doesn't cause other build tooling regressions that requires a revert there, I think it would be the best fix given the case here. |
It seems the build error is fixed in Svelte 5.15.0. |
I'll close this for now as fixed then. Thanks for testing! |
Astro Info
Describe the Bug
If I try to build the Astro website that contains Svelte component with $onMount() and Cloudflare adapter, the build error will occurs like this.
Build error:
It doesn't occurs when I use NodeJS adapter. It seems it is occurring after
@astrojs/cloudflare@12.1.0
update.What's the expected result?
No build errors.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro-svelte-cloudflare-build-error
Participation
The text was updated successfully, but these errors were encountered: