From b060090fb1b40470abc3b4d688dc5d17763a5095 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Wed, 17 May 2017 16:20:14 +0200 Subject: [PATCH] fix generate only index.html when router.mode = 'hash' --- lib/generate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/generate.js b/lib/generate.js index 9128f12a1..a48241aa4 100644 --- a/lib/generate.js +++ b/lib/generate.js @@ -69,7 +69,7 @@ export default async function () { } await copy(srcBuiltPath, distNuxtPath) debug('Static & build files copied') - if (this.options.router !== 'hash') { + if (this.options.router.mode !== 'hash') { // Resolve config.generate.routes promises before generating the routes try { var generateRoutes = await promisifyRoute(this.options.generate.routes || []) @@ -91,7 +91,7 @@ export default async function () { /* ** Generate only index.html for router.mode = 'hash' */ - let routes = (this.options.router === 'hash') ? ['/'] : this.routes + let routes = (this.options.router.mode === 'hash') ? ['/'] : this.routes while (routes.length) { let n = 0 await Promise.all(routes.splice(0, 500).map(async (route) => {