Skip to content

hengkysteen/vue_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue_app

How Deploy vue 3 (Vite) to github pages

  1. Set base to vite.config.js
export default defineConfig({
  base:
    process.env.NODE_ENV === "production"
      ? "/YOUR_PROJECT_NAME/" // production
      : "/", // development
});
  1. Remove dist from .gitignore
  2. build project
npm run build
  1. Make sure to commit & push origin master/main

  2. Use subtree

 git subtree push --prefix dist origin gh-pages

  1. Go to your project repo & open settings > pages > on Build and deployment branch change to gh-pages & save.
  2. Done. Visite site