Skip to content

Commit 0123c37

Browse files
committed
fix(projects): Fix the logic of root route redirection to home
1 parent 418302a commit 0123c37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/router/routes/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { CustomRoute, ElegantConstRoute, ElegantRoute } from '@elegant-router/types';
22
import { generatedRoutes } from '../elegant/routes';
33
import { layouts, views } from '../elegant/imports';
4-
import { transformElegantRoutesToVueRoutes } from '../elegant/transform';
4+
import { getRoutePath, transformElegantRoutesToVueRoutes } from '../elegant/transform';
55

66
export const ROOT_ROUTE: CustomRoute = {
77
name: 'root',
88
path: '/',
9-
redirect: '/home',
9+
redirect: getRoutePath(import.meta.env.VITE_ROUTE_HOME) || '/home',
1010
meta: {
1111
title: 'root',
1212
constant: true

0 commit comments

Comments
 (0)