NextJS is slower on CF than on Vercel

So I'm looking to optimise my NextJS website (just the landing page) to ensure that it has the best ranking opportunities on Google. I ran the lighthouse test on the current website (https://cruncho.app) which is currently on CF and then compared it against (https://cruncho-landing-karthikjn01.vercel.app/) which is running on Vercel. I found the lighthouse score to be quite a bit better on vercel than on CF which is strange cos Vercel (edge) runs on CF right? Cloudflare LH score: (80) Vercel LH score: (94) If anyone would be able to help me out that'd be fantastic, thanks in advance!
Cruncho | Restaurant Management
Cruncho, restaurant management software created to help restaurants manage their menus, and more! Generate QR code menus for your restaurant.
Cruncho | Restaurant Management
Cruncho, restaurant management software created to help restaurants manage their menus, and more! Generate QR code menus for your restaurant.
No description
No description
8 Replies
mr nooli
mr nooli•11mo ago
When I enable CF Proxy it matches Vercel's performance - but that makes me wonder, is Vercel automatically running through CF's CDN?
James
James•11mo ago
I mean, I know Vercel use Cloudflare, but I'm not sure the extent to which they use it
Ben-xD
Ben-xD•11mo ago
Do you mean the DNS proxy, @mr nooli ? Also, are you running on Cloudflare Pages or workers?
mr nooli
mr nooli•11mo ago
Yeah the DNS proxy, and I'm using next-on-pages but it's being deployed as a worker if I'm not mistaken
Ben-xD
Ben-xD•11mo ago
If you're using workers, I guess you're not using pages or https://github.com/cloudflare/next-on-pages?
GitHub
GitHub - cloudflare/next-on-pages: CLI to build and develop Next.js...
CLI to build and develop Next.js apps for Cloudflare Pages - GitHub - cloudflare/next-on-pages: CLI to build and develop Next.js apps for Cloudflare Pages
mr nooli
mr nooli•11mo ago
hummmmmm the build command is... mkdir .vercel; echo '{"projectId":"_","orgId":"_","settings":{"framework":"nextjs"}}' > .vercel/project.json; npx vercel build; rm -rf .vercel/output/functions/_not-found*; rm -rf .vercel/output/functions/_error*; npx @cloudflare/next-on-pages --skip-build; suggested by @Better James
James
James•11mo ago
When they said they believe it gets deployed as a worker, they're referring to how Pages allows you to have server functionality by deploying a worker along with the static assets, which is what next-on-pages creates
mr nooli
mr nooli•11mo ago
Yep ^ thanks @Better James 😅
Want results from more Discord servers?
Add your server