diff --git a/frontend/src/router.js b/frontend/src/router.js index b1836e1..c797942 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -4,7 +4,7 @@ import Index from './views/Index.vue' import Package from './views/Package.vue' const router = createRouter({ - history: createWebHistory(), + history: createWebHistory(__WEBSITE_BASE__), routes: [ { path: '/', component: Index }, { path: '/:packageName', component: Package } diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 8aa6824..62fe209 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -9,6 +9,8 @@ export default defineConfig(({command}) => { return { plugins: [ replace({ // production / development environment api base + __WEBSITE_BASE__: command === 'build' ? JSON.stringify('/packages') + : JSON.stringify(''), __API_BASE__: command === 'build' ? JSON.stringify('https://bioarchlinux.org') : JSON.stringify(''), preventAssignment: true,