We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 418302a commit 0123c37Copy full SHA for 0123c37
src/router/routes/index.ts
@@ -1,12 +1,12 @@
1
import type { CustomRoute, ElegantConstRoute, ElegantRoute } from '@elegant-router/types';
2
import { generatedRoutes } from '../elegant/routes';
3
import { layouts, views } from '../elegant/imports';
4
-import { transformElegantRoutesToVueRoutes } from '../elegant/transform';
+import { getRoutePath, transformElegantRoutesToVueRoutes } from '../elegant/transform';
5
6
export const ROOT_ROUTE: CustomRoute = {
7
name: 'root',
8
path: '/',
9
- redirect: '/home',
+ redirect: getRoutePath(import.meta.env.VITE_ROUTE_HOME) || '/home',
10
meta: {
11
title: 'root',
12
constant: true
0 commit comments