Skip to content

Commit

Permalink
fix($core): regression of introducing dynamic routerBase (close: #1498)
Browse files Browse the repository at this point in the history
Also renaming __VUEPRESS_ROUTE_BASE__ to __VUEPRESS_ROUTER_BASE__
  • Loading branch information
ulivz committed Mar 31, 2019
1 parent cb84c5c commit 5e12b49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/@vuepress/core/lib/client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ Vue.prototype.$withBase = function (path) {
}

export function createApp (isServer) {
const routerBase = typeof window !== 'undefined'
? window.__VUEPRESS_ROUTER_BASE__
: (siteData.routerBase || siteData.base)

const router = new Router({
base: window.__VUEPRESS_ROUTE_BASE__ || siteData.base,
base: routerBase,
mode: 'history',
fallback: false,
routes,
Expand Down

0 comments on commit 5e12b49

Please sign in to comment.