fix(cli): vue-router catchAll usage

This commit is contained in:
chenjiahan
2020-09-19 06:29:05 +08:00
parent ae26d6d4d9
commit ffeb656505
2 changed files with 8 additions and 4 deletions

View File

@@ -47,12 +47,14 @@ function getRoutes() {
if (locales) {
routes.push({
path: '/:catchAll(.*)',
name: 'notFound',
path: '/:path(.*)+',
redirect: (route) => `/${getLangFromRoute(route)}/`,
});
} else {
routes.push({
path: '/:catchAll(.*)',
name: 'notFound',
path: '/:path(.*)+',
redirect: '/',
});
}