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.dev2 Replies
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