fix(cli): incorrect route redirect config

This commit is contained in:
chenjiahan
2020-11-27 16:12:15 +08:00
parent a4a96d7146
commit 8a4690a1d2
2 changed files with 12 additions and 4 deletions

View File

@@ -49,13 +49,17 @@ function getRoutes() {
routes.push({
name: 'notFound',
path: '/:path(.*)+',
redirect: (route) => `/${getLangFromRoute(route)}/`,
redirect: (route) => ({
name: getLangFromRoute(route),
}),
});
} else {
routes.push({
name: 'notFound',
path: '/:path(.*)+',
redirect: '/',
redirect: {
name: 'home',
},
});
}