diff --git a/lib/app/router.js b/lib/app/router.js index ce04fcc213..0deb55b696 100644 --- a/lib/app/router.js +++ b/lib/app/router.js @@ -54,7 +54,7 @@ const scrollBehavior = (to, from, savedPosition) => { <% } %> export default new Router({ - mode: 'history', + mode: '<%= router.mode %>', base: '<%= router.base %>', linkActiveClass: '<%= router.linkActiveClass %>', scrollBehavior, diff --git a/lib/build.js b/lib/build.js index 71203675e6..f70a7bc858 100644 --- a/lib/build.js +++ b/lib/build.js @@ -172,6 +172,7 @@ function * generateRoutesAndFiles () { uniqBy: _.uniqBy, isDev: this.dev, router: { + mode: this.options.router.mode, base: this.options.router.base, middleware: this.options.router.middleware, linkActiveClass: this.options.router.linkActiveClass, diff --git a/lib/nuxt.js b/lib/nuxt.js index 6982b29049..ac4d1a250c 100644 --- a/lib/nuxt.js +++ b/lib/nuxt.js @@ -36,6 +36,7 @@ class Nuxt { mode: 'out-in' }, router: { + mode: 'history', base: '/', middleware: [], linkActiveClass: 'nuxt-link-active',