Cloudflare caching old Next.js build files and causing chunk errors

Hello,
I’m using Cloudflare to protect my Next.js app, but I’m facing a serious issue with caching. My app only works correctly when I pause Cloudflare.

I’ve already tried everything I could:

Cleared all Cloudflare cache

Enabled Development Mode

Created page rules to disable caching for Next.js build static files (_next/static, etc.)

However, Cloudflare still seems to serve old build files after each new deployment, causing chunk mismatch errors in the browser.

When Cloudflare is paused, the app loads the correct and updated files immediately.

Could you please help me resolve this issue so Cloudflare doesn’t cache outdated chunks from my Next.js builds?
Was this page helpful?