adapters icon indicating copy to clipboard operation
adapters copied to clipboard

Cloudflare v10 + Solid breaks some components and scripts

Open MehrdadKhnzd opened this issue 1 year ago • 27 comments

Astro Info

Astro                    v4.5.16
Node                     v20.12.0
System                   Linux (x64)
Package Manager          bun
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             unocss
                         @astrojs/solid-js
                         @swup/astro
                         @vite-pwa/astro-integration

Describe the Bug

When I deployed my web app using the new Cloudflare adapter, the functionality of many components and pages became broken.

For many components, it acts like I haven't added client:load at all - just rendering the component in a static form without having any functionality. Surprisingly, it worked for a few others. I'm still not sure about the exact situation causing it.

Also, it doesn't render the pages that have onMount in them. It just outputs blank.

What's the expected result?

All of them should work properly. In the minimal reproduction, you can see how using onMount makes the rendering blank. You can also comment onMount on the Btn.tsx component to see how it renders. I still don't have a concrete example of when the component becomes static and doesn't do anything, but I will add it here if I can.

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/MehrdadKhnzd/astro-bug-reproduction

Participation

  • [ ] I am willing to submit a pull request for this issue.

MehrdadKhnzd avatar Apr 06 '24 04:04 MehrdadKhnzd