Solid's `clientOnly` only works with "Development Mode" enabled [solved]

Steps to reproduce 1. Clone this minimal repo https://github.com/AlexErrant/solid-start-cf-basic 2. pnpm i && pnpm build && pnpm run deploy 3. Observe that it works on the whatever-name.pages.dev domain 4. Observe that a Cloudflare Site doesn't work (for me, DNS is setup like CNAME, pentive.com, hub-b6m.pages.dev) From Cloudflare's Dashboard, Caching/Configuration, I've hit the "Purge Everything" button to clear the cache. It doesn't fix anything. Strangely, enabling "Development Mode" makes clientOnly render as expected. But it only works for 3hrs before Cloudflare turns it off again, so obviously it's not a real solution. Ordinarily I'd think this is a SolidStart issue... but since "Development Mode" makes it work I think this is on Cloudflare. (Or me for missing something obvious.) The links work, so you can view the difference in behavior https://pentive.com/ https://hub-b6m.pages.dev
2 Replies
Erisa
Erisa•4mo ago
Maybe its auto minify?
curl -s 'https://api.cloudflare.com/client/v4/zones/INSERT_ZONE_ID_HERE/settings/minify' -X PATCH -d '{"value":{"css":"off","html":"off","js":"off"}}' --header "Authorization: Bearer INSERT_TOKEN_HERE" --header "Content-Type: application/json"
curl -s 'https://api.cloudflare.com/client/v4/zones/INSERT_ZONE_ID_HERE/settings/minify' -X PATCH -d '{"value":{"css":"off","html":"off","js":"off"}}' --header "Authorization: Bearer INSERT_TOKEN_HERE" --header "Content-Type: application/json"
https://community.cloudflare.com/t/deprecating-auto-minify/655677/18?u=erisa
AlexErrant
AlexErrantOP•4mo ago
Wow, that was it; thank you!!! No idea why minification would screw everything up, but I'm just so glad to find a solution after debugging for 2 days now 😭 I'm guessing SolidStart was using something that got minified away >_> probably hydration markers or something
Want results from more Discord servers?
Add your server