mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-22 07:46:15 -04:00
refactor(config): added config management with figue
This commit is contained in:
parent
5ce1262fb4
commit
6becdbb423
7 changed files with 82 additions and 12 deletions
|
@ -3,6 +3,7 @@ import { createRouter, createWebHistory } from 'vue-router';
|
|||
import HomePage from './pages/Home.page.vue';
|
||||
import NotFound from './pages/404.page.vue';
|
||||
import { tools } from './tools';
|
||||
import { config } from './config';
|
||||
|
||||
const toolsRoutes = tools.map(({ path, name, component, ...config }) => ({
|
||||
path,
|
||||
|
@ -17,7 +18,7 @@ const toolsRedirectRoutes = tools
|
|||
);
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
history: createWebHistory(config.app.baseUrl),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue