Hello, I have a simple website developed using Next js. I’m using Cloudflare Pages to host the website.
In the preview deploys using dev
branch everything works well. But in the production deploy, using main
branch. The website is broken and there are console errors.
The console errors say Refused to execute script from 'https://annakukla.com/_next/static/chunks/framework-e70c6273bfe3f237.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
And I see that in the production website JS files have this header content-type: text/html; charset=utf-8
which is wrong since it’s a JS file.
Is this a bug with Pages? and if so how can I remedy it?