This commit is contained in:
parent
80bf195081
commit
acb0cb5987
|
@ -4,7 +4,7 @@ pipeline:
|
||||||
commands:
|
commands:
|
||||||
- npm i
|
- npm i
|
||||||
- sed -i "s#setPublicPath('/')#setPublicPath('/og-image')#" webpack.config.js
|
- 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
|
- npm run build
|
||||||
|
|
||||||
update:
|
update:
|
||||||
|
|
|
@ -2,9 +2,11 @@ import { createRouter, createWebHistory } from 'vue-router'
|
||||||
import Home from './page/Home.vue'
|
import Home from './page/Home.vue'
|
||||||
import About from './page/About.vue'
|
import About from './page/About.vue'
|
||||||
|
|
||||||
|
const APP_BASE_URL = '/'
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: APP_BASE_URL,
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
component: Home,
|
component: Home,
|
||||||
meta: {
|
meta: {
|
||||||
|
@ -23,7 +25,7 @@ const routes = [
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHistory(),
|
||||||
base: '/',
|
base: APP_BASE_URL,
|
||||||
routes,
|
routes,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue