Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

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

Merged
merged 6 commits into from Oct 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/nuxt/src/core/nitro.ts
Expand Up @@ -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: {
Expand Down