Skip to content

gh-pages does not render anything to the page #47932

Answered by melvincwng
roymansoor asked this question in Pages
Discussion options

You must be logged in to vote

Hey @roymansoor 👋, if you are trying to deploy your Vite/React app (i.e. https://roymansoor.github.io/) on GH pages, please take at look at the following below.

Based on Vite's documentation link over here:

From what I'm seeing in your repository, your current vite.config.js is setup like this:

It could be an issue with the 'base' key in vite.config.js, hence consider doing the following:

  1. Omitting line 7 - meaning to remove the 'base' key in vite.config.js
  2. Run 'npm run build' to generate the new /dist folder/files
  3. Commit those files into your code repository
  4. Finally redeploy the web app on GitHub pages, and see if it works.
  5. Consider looking at the 'References' section below to continue…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@roymansoor
Comment options

@roymansoor
Comment options

@roymansoor
Comment options

@melvincwng
Comment options

Answer selected by roymansoor
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pages Host a static website, right from your repo Question
3 participants