add base url
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2023-01-30 12:51:57 +01:00
parent 80bf195081
commit acb0cb5987
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 5 additions and 3 deletions

View file

@ -4,7 +4,7 @@ pipeline:
commands:
- npm i
- sed -i "s#setPublicPath('/')#setPublicPath('/og-image')#" webpack.config.js
- sed -i "s#\(base.*\)'/'#\1'/og-image'#" src/router.js
- sed -i "s#APP_BASE_URL = '/'#APP_BASE_URL = '/og-image'#" src/router.js
- npm run build
update:

View file

@ -2,9 +2,11 @@ import { createRouter, createWebHistory } from 'vue-router'
import Home from './page/Home.vue'
import About from './page/About.vue'
const APP_BASE_URL = '/'
const routes = [
{
path: '/',
path: APP_BASE_URL,
name: 'Home',
component: Home,
meta: {
@ -23,7 +25,7 @@ const routes = [
const router = createRouter({
history: createWebHistory(),
base: '/',
base: APP_BASE_URL,
routes,
});