From fc99d59f643fb185fda10131331e261364cd951e Mon Sep 17 00:00:00 2001 From: ULIVZ <472590061@qq.com> Date: Sun, 31 Mar 2019 23:43:13 +0800 Subject: [PATCH] feat($core): allow dynamic routeBase at runtime Setting it via window.__VUEPRESS_ROUTE_BASE__ at enhance app file. --- packages/@vuepress/core/lib/client/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vuepress/core/lib/client/app.js b/packages/@vuepress/core/lib/client/app.js index bcccec1797..e89cb21abd 100644 --- a/packages/@vuepress/core/lib/client/app.js +++ b/packages/@vuepress/core/lib/client/app.js @@ -62,7 +62,7 @@ Vue.prototype.$withBase = function (path) { export function createApp (isServer) { const router = new Router({ - base: siteData.base, + base: window.__VUEPRESS_ROUTE_BASE__ || siteData.base, mode: 'history', fallback: false, routes,