vue3 git pages 404 에러
-
vue3 git pages 새로고침 시 404 에러이슈 기록 2021. 4. 19. 07:58
router/index.js import { createRouter, createWebHistory } from 'vue-router' createWebHistory -> createWebHashHistory 로 바꾼다. createWebHashHistory : 새로고침 시 주소창에 #이 추가 된다.. 아래 createRouter({ history: createWebHistory -> history: createWebHashHistory ()로 바꾼다 routes }) createWebHistory -> createWebHashHistory로 바꾸면 git pages reload 404 에러가 해결된다. 리로드 문제는 해결되지만 SPA만 사용한 git pages는 SEO에 걸리지 않는다고 한다.