How to preview Vue projects in Git pages

want to preview Vue project on Git pages
add index.html after the link given cannot achieve complete effect
only one content in index.html
component effect cannot present
solve

Oct.26,2021

what non-static websites cannot preview on git pages is the content uploaded to git after build


cannot render component content because the Vue project is not packaged. If you use index.html in the root directory of the project, of course there will be no content.

solve:

  1. package the Vue project and execute the command $npm run build in the project root directory.
  2. the packaged resources are placed in the dist directory, and the contents of this directory are placed in Git Pages.
Menu