Reputation: 25
I uploaded my React site to GitHub under the repo jschlte.github.io it displays a blank page with the error of "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/jsx". Strict MIME type checking is enforced for module scripts per HTML spec". But on Netlify the site loads up just fine.
GitHub Pages: https://jschlte.github.io/
Netlify: https://jschlte.netlify.app/
Upvotes: 0
Views: 136
Reputation: 11
This github page only host static
website. If you develop your web based on Reactjs, you need to translate your codes to pure html/css/js by using tool like webpack. In your case, you only need to npm run build
and deploy
again to your github repo. Then everything will work.
Upvotes: 1