Skip to content

Commit 95f6940

Browse files
authored
Update index.ts
修复 VITE_APP_PUBLIC_PATH 修改为其它路径时显示空白页面的问题
1 parent 35b5085 commit 95f6940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/router/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const routes = [
3030

3131
// 创建路由实例并传递 `routes` 配置
3232
const router = createRouter({
33-
history: createWebHistory(),
33+
history: createWebHistory(process.env.VUE_APP_PUBLIC_PATH),
3434
routes,
3535
scrollBehavior() {
3636
// 始终滚动到顶部

0 commit comments

Comments
 (0)