浏览代码

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,
 })