Everyone asks you a question: how to upload the Vue project to GitHub to realize the preview after it is packaged?

how to upload the Vue project to GitHub to realize the preview function
is it only necessary to upload the dist file?
what if the cart.json data cannot be read when the dist file style fails?

Nov.25,2021

you can put the package result of the Vue project in the corresponding project gh-pages.

  1. submit the project to the warehouse (including the dist directory) if the warehouse name is test.
  2. $git subtree push-- prefix dist origin gh-pages , submit the dist directory to gh-pages.
  3. enter https://< your github name > .github.io / test/ in the address bar to view the page.
The failure of the

style may be the cause of the error in the reference path. If you are building a project using Vue-cli3.0, you need to set baseUrl:'/ staff/' in vue.config.js .

For the problem that cart.json data cannot be read, you need to provide how cart.json is read in the project. Can the specific code be displayed?


you can use GitHub Pages

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9c6ae-18d4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9c6ae-18d4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?