Svelte/kit on CF behaves differently on two domains, with the same deployment

Hey all, I've deployed a svelte app using cloudflare pages, but it's behaving really really weirdly. https://discord.com/channels/457912077277855764/1239235015422902372 - is my post in the svelte discord, but to simplify it, it works in the default pages.dev domain, but not with my custom menu.cruncho.app domain... and I've got no idea why
16 Replies
mr nooli
mr nooliOPā€¢8mo ago
I can't actually tell if this is an issue on the cloudflare side or the svelte side... so I've put it here just in case!
Hello, Iā€™m Allie!
I'm seeing a bunch of subresource hash failures on the custom domain. Might it be that you are hard-coding the pages.dev domain somewhere, which breaks the hashes?
mr nooli
mr nooliOPā€¢8mo ago
no reference to pages.dev on my end
Chaika
Chaikaā€¢8mo ago
the only error I see is this:
No description
mr nooli
mr nooliOPā€¢8mo ago
I'm completely new to svelte so bear with me! šŸ™‚
Chaika
Chaikaā€¢8mo ago
there's only a few differences between Custom Domains and the pages.dev, the primary ones being - minification - caching
Hello, Iā€™m Allie!
ooh, good point
mr nooli
mr nooliOPā€¢8mo ago
ah, could it be that the minification could be causing an issue?
Chaika
Chaikaā€¢8mo ago
could be, I'm not familiar with svelte too much either but I know some frameworks break with it lol You can turn it off under Speed -> Optimizations -> Content Optimization -> Auto Minify (under websites -> click on your website in Cloudflare) Magic Link: https://dash.cloudflare.com/?to=/:account/:zone/speed/optimization/content turn off Rocket Loader as well if that's on, it's just above Auto Minify. I don't see it on your site, but just another thing that could cause issues
mr nooli
mr nooliOPā€¢8mo ago
Disabled everything no luck still - also purged my cache Oh it's working šŸ™ƒ
Walshy
Walshyā€¢8mo ago
is hydration_missing_marker_open something from your app? ah nice
mr nooli
mr nooliOPā€¢8mo ago
Damn, that's a really strange error thanks a bunch hydration_missing_marker_open I genuinely couldn't tell you šŸ˜‚
Walshy
Walshyā€¢8mo ago
since you did both so close together hard to say which fixed it
Chaika
Chaikaā€¢8mo ago
I'm assuming it was minification, caching can also cause issues but all your assets look like they have hashes in the name and no cache on html
Walshy
Walshyā€¢8mo ago
it's svelte, it just wasn't showing anything on google but github search returns it
mr nooli
mr nooliOPā€¢8mo ago
kk, just glad I got that fixed, really appreciate it šŸ™‚
Want results from more Discord servers?
Add your server