Skip to content

Commit

Permalink
fix: the basename of router should be kept while the history mode is …
Browse files Browse the repository at this point in the history
…hash (#2459)
  • Loading branch information
kuitos authored and sorrycc committed May 22, 2019
1 parent 9eb742f commit 9d39708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/umi-build-dev/src/plugins/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function(api) {
const [historyType, opts] = getHistoryConfig(config.history);

if (historyType === 'hash') {
const hashOpts = JSON.stringify(opts || {});
const hashOpts = JSON.stringify({ basename: config.base || '/', ...opts } || {});
return `require('history/createHashHistory').default(${hashOpts})`;
} else if (historyType === 'memory') {
return `require('history/createMemoryHistory').default({ initialEntries: window.g_initialEntries })`;
Expand Down

0 comments on commit 9d39708

Please sign in to comment.