瀏覽代碼

perf(router): 优化路由 base 路径配置

wangcong 2 月之前
父節點
當前提交
0d838b60aa
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/router/index.ts

+ 1 - 3
src/router/index.ts

@@ -10,9 +10,7 @@ const routes = [
 // console.log(import.meta.env.BASE_URL, import.meta.env);
 
 const router = createRouter({
-  history: createWebHistory(
-    import.meta.env.BASE_URL[0] === '/' ? import.meta.env.BASE_URL : '/'
-  ),
+  history: createWebHistory('/v/'),
   routes,
 });