fix(nuxt): don't prerender index.html with a server (#7831)

This commit is contained in:
Daniel Roe 2022-10-03 15:17:46 +01:00 committed by GitHub
parent 63c88056c7
commit 92ff066ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,8 +56,8 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
prerender: { prerender: {
crawlLinks: nuxt.options._generate ? nuxt.options.generate.crawler : false, crawlLinks: nuxt.options._generate ? nuxt.options.generate.crawler : false,
routes: ([] as string[]) routes: ([] as string[])
.concat(nuxt.options._generate ? ['/', '/200.html', ...nuxt.options.generate.routes] : []) .concat(nuxt.options.generate.routes)
.concat(nuxt.options.ssr === false ? ['/index.html', '/200.html', '/404.html'] : []) .concat(nuxt.options._generate ? [nuxt.options.ssr ? '/' : '/index.html', '/200.html', '/404.html'] : [])
}, },
sourceMap: nuxt.options.sourcemap.server, sourceMap: nuxt.options.sourcemap.server,
externals: { externals: {