Skip to content

Blank Page on GitHub Pages Deployment for Vite + React Project #145772

Discussion options

You must be logged in to vote

You need to know that this is not how react works, as your projet needs to be build, optimized and bundled into one single file of HTML, CSS, JS which you will see in the /dist folder using the command npm run build and to preview them you need to run the command npm run preview (why?, because the code you worked on is for development and the setup provided is for you to develop your app, for more info check this blog for example),

Beside this, For the deployment it's better to use vercel, as it's more suitable for this kind of projects, as github pages are more likely made for simple static websites (you can use github pages but vercel is better), go to vercel website, create new project…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Prajapati-ankit-it
Comment options

Answer selected by Prajapati-ankit-it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working correctly Pages Host a static website, right from your repo
2 participants