기본 셋팅 후 깃허브에 파일을 업로드 한 다음 과정.
파일수정
vue.config.js
파일 수정
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/vue-page/" : "/",
outputDir: "docs",
};
publicPath: process.env.NODE_ENV === "production" ? "/<프로젝트명>/" : "/",
npm run build
"docs" 폴더가 생겼으면, 푸시한다.
참고
https://cli.vuejs.org/config/#target-browsers
Configuration Reference | Vue CLI
Configuration Reference Global CLI Config Some global configurations for @vue/cli, such as your preferred package manager and your locally saved presets, are stored in a JSON file named .vuerc in your home directory. You can edit this file directly with yo
cli.vuejs.org
Github page 수정
결과
다른방법
Vue - 사이트를 Github Pages에 배포하기 1 : Jessi's Note (tistory.com)
Vue - 사이트를 Github Pages에 배포하기 1
Vue.js로 만든 사이트를 다른사람도 볼수 있도록 배포를 해보자. Point. vue파일들을 그대로 올리는 것이 아니고, build를 실행해서 생성된 파일을 올려야 한다. 깃허브 로그인 https://github.com/ GitHub: Let
mansu.tistory.com
반응형