Skip to content

Commit 6205279

Browse files
committed
revert: refactor(client): remove extra handling for router base
This reverts commit 299511d.
1 parent e7135a7 commit 6205279

File tree

1 file changed

+3
-1
lines changed
  • packages/@vuepress/client/src

1 file changed

+3
-1
lines changed

packages/@vuepress/client/src/app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { computed, h } from 'vue'
22
import type { CreateAppFunction, App, ComponentOptions } from 'vue'
33
import { createRouter, RouterView, START_LOCATION } from 'vue-router'
44
import type { Router, RouterHistory } from 'vue-router'
5+
import { removeEndingSlash } from '@vuepress/shared'
56
import { clientAppEnhances } from '@internal/clientAppEnhances'
67
import { clientAppRootComponents } from '@internal/clientAppRootComponents'
78
import { clientAppSetups } from '@internal/clientAppSetups'
@@ -71,7 +72,8 @@ export const createVueApp = async ({
7172

7273
// create vue-router
7374
const router = createRouter({
74-
history: historyCreator(siteData.value.base),
75+
// TODO: it might be an issue of vue-router that have to remove the ending slash
76+
history: historyCreator(removeEndingSlash(siteData.value.base)),
7577
routes: pagesRoutes,
7678
scrollBehavior: (to, from, savedPosition) => {
7779
if (savedPosition) {

0 commit comments

Comments
 (0)