mirror of
https://github.com/BioArchLinux/Rosa.git
synced 2025-03-10 12:02:43 +00:00
fix frontend router url base
This commit is contained in:
parent
1845d1329b
commit
24ede16076
2 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,7 @@ import Index from './views/Index.vue'
|
||||||
import Package from './views/Package.vue'
|
import Package from './views/Package.vue'
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(__WEBSITE_BASE__),
|
||||||
routes: [
|
routes: [
|
||||||
{ path: '/', component: Index },
|
{ path: '/', component: Index },
|
||||||
{ path: '/:packageName', component: Package }
|
{ path: '/:packageName', component: Package }
|
||||||
|
|
|
@ -9,6 +9,8 @@ export default defineConfig(({command}) => { return {
|
||||||
plugins: [
|
plugins: [
|
||||||
replace({
|
replace({
|
||||||
// production / development environment api base
|
// production / development environment api base
|
||||||
|
__WEBSITE_BASE__: command === 'build' ? JSON.stringify('/packages')
|
||||||
|
: JSON.stringify(''),
|
||||||
__API_BASE__: command === 'build' ? JSON.stringify('https://bioarchlinux.org')
|
__API_BASE__: command === 'build' ? JSON.stringify('https://bioarchlinux.org')
|
||||||
: JSON.stringify(''),
|
: JSON.stringify(''),
|
||||||
preventAssignment: true,
|
preventAssignment: true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue