소스 검색

fix(deploy): set router base via `import.meta.env.BASE_URL` for subpath deployment

Zander Hawke 1 주 전
부모
커밋
8c35929683
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      apps/dev/src/main.ts

+ 1 - 1
apps/dev/src/main.ts

@@ -9,7 +9,7 @@ const routes = [{ path: "/", component: EditorView }]
 
 const app = createApp(App)
 const router = createRouter({
-  history: createWebHistory(),
+  history: createWebHistory(import.meta.env.BASE_URL),
   routes,
 })