From a89f36311521507c3a14ab8336649678151e16a6 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 4 May 2019 12:13:29 +0200 Subject: [PATCH] feat: browser history is aware of basename (#45) * feat: browser history is aware of basename * test: fix ui options global object * chore: fix comment --- src/webui/history.js | 5 ++++- src/webui/template/index.html | 2 ++ src/webui/utils/url.js | 8 ++++++++ test/unit/setup.js | 1 + tools/webpack.config.js | 1 + tools/webpack.prod.config.babel.js | 2 ++ 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/webui/history.js b/src/webui/history.js index f8407b0..d5db97d 100644 --- a/src/webui/history.js +++ b/src/webui/history.js @@ -3,7 +3,10 @@ */ import { createBrowserHistory } from 'history'; +import { getBaseNamePath } from './utils/url'; -const history = createBrowserHistory(); +const history = createBrowserHistory({ + basename: getBaseNamePath(), +}); export default history; diff --git a/src/webui/template/index.html b/src/webui/template/index.html index f924a8c..6dd5c35 100644 --- a/src/webui/template/index.html +++ b/src/webui/template/index.html @@ -9,6 +9,8 @@