Cloudflare Pages Build configuration
Found out my sitemap.xml
link was broken.
It turns out build script on Cloudflare was set to "Framework preset: Next.js (Static HTML Export)" which didn't include my custom step, "next-sitemap", in the build process.
Okay. "Settings/Builds & deployments/Build configuration" has been changed and deployed.
Checkout how I did it with next-sitemap
Deployment failed with following error messages.
Stack Overflow search showed this problem has been solved since Node version 14.12.
Doesn't Cloudflare support recent Node versions? Thought about going back to Netlify for a while. Turns out you can change the default versions of languages that run on Cloudflare (Cloudflare Pages Build-configuration). Of course you can.
Default version of Node.js is 12.18.0 as of this writing. I changed this to my current local Node.js version of 16.15.0.
Done.