Skip to content

Commit 6f8104a

Browse files
authored
Fix empty Vue application routing (#84)
1 parent 6888b47 commit 6f8104a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

templates/vue/application/src/router.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const router = new Router({
5858
content: () =>
5959
import(/* webpackChunkName: "login" */ "./views/login-form")
6060
}
61-
}<%=^empty%>,
61+
},<%=^empty%>
6262
{
6363
path: "/",
6464
redirect: "/home"
@@ -70,8 +70,12 @@ const router = new Router({
7070
{
7171
path: "*",
7272
redirect: "/home"
73-
}
74-
<%=/empty%>]
73+
}<%=/empty%>
74+
<%=#empty%>{
75+
path: "*",
76+
redirect: "/"
77+
}<%=/empty%>
78+
]
7579
});
7680

7781
router.beforeEach((to, from, next) => {

0 commit comments

Comments
 (0)