fix(nuxt): generate 200.html and 404.html spa fallback files (#6308)

This commit is contained in:
pooya parsa 2022-08-02 18:45:44 +02:00 committed by GitHub
parent 4379e9d922
commit 000d81d760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ export async function initNitro (nuxt: Nuxt) {
crawlLinks: nuxt.options._generate ? nuxt.options.generate.crawler : false,
routes: []
.concat(nuxt.options._generate ? ['/', ...nuxt.options.generate.routes] : [])
.concat(nuxt.options.ssr === false ? ['/', '/200', '/404'] : [])
.concat(nuxt.options.ssr === false ? ['/', '/200.html', '/404.html'] : [])
},
sourcemap: nuxt.options.sourcemap,
externals: {