Skip to content

Commit 3ec94e9

Browse files
authored
Merge pull request #21 from weiq/main
fix: 🐛 fixed blank page when VITE_APP_PUBLIC_PATH is changed (#20)
2 parents 35b5085 + 95f6940 commit 3ec94e9

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)