From 92ff066ab26c72e3488b16b8da391178647ada9d Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 3 Oct 2022 15:17:46 +0100 Subject: [PATCH] fix(nuxt): don't prerender index.html with a server (#7831) --- packages/nuxt/src/core/nitro.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index d66578d243..d473a3a9ae 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -56,8 +56,8 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { prerender: { crawlLinks: nuxt.options._generate ? nuxt.options.generate.crawler : false, routes: ([] as string[]) - .concat(nuxt.options._generate ? ['/', '/200.html', ...nuxt.options.generate.routes] : []) - .concat(nuxt.options.ssr === false ? ['/index.html', '/200.html', '/404.html'] : []) + .concat(nuxt.options.generate.routes) + .concat(nuxt.options._generate ? [nuxt.options.ssr ? '/' : '/index.html', '/200.html', '/404.html'] : []) }, sourceMap: nuxt.options.sourcemap.server, externals: {