Skip to content

Commit 5e12b49

Browse files
committed
fix($core): regression of introducing dynamic routerBase (close: #1498)
Also renaming __VUEPRESS_ROUTE_BASE__ to __VUEPRESS_ROUTER_BASE__
1 parent cb84c5c commit 5e12b49

File tree

1 file changed

+5
-1
lines changed
  • packages/@vuepress/core/lib/client

1 file changed

+5
-1
lines changed

packages/@vuepress/core/lib/client/app.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ Vue.prototype.$withBase = function (path) {
6161
}
6262

6363
export function createApp (isServer) {
64+
const routerBase = typeof window !== 'undefined'
65+
? window.__VUEPRESS_ROUTER_BASE__
66+
: (siteData.routerBase || siteData.base)
67+
6468
const router = new Router({
65-
base: window.__VUEPRESS_ROUTE_BASE__ || siteData.base,
69+
base: routerBase,
6670
mode: 'history',
6771
fallback: false,
6872
routes,

0 commit comments

Comments
 (0)