Github pages not displaying my vite.js website with tailwind #20583
-
Describe the bug ![]() ![]() ![]() ![]() Once i push to my github and then go to the pages feature on github where github generates a link for my web app, the screen is white and i get this error: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. I am running a react app created with Vite.js locally and everything works perfectly when i run npm run dev. It should do the same when github generates a link for my website Reproduction https://github.com/maulaibrahimsyahwi/Portofolio-Maula-Ibrahim-Syahwi Manajer Paket Bekas |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You're trying to serve the raw assets which will not work, you must build the app first ( Vite's docs provide a guide for how to set this up: https://vite.dev/guide/static-deploy.html#github-pages |
Beta Was this translation helpful? Give feedback.
You're trying to serve the raw assets which will not work, you must build the app first (
npm run build
, in your repo).Vite's docs provide a guide for how to set this up: https://vite.dev/guide/static-deploy.html#github-pages