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) => {