mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): improve default prerender behaviour (#21817)
This commit is contained in:
parent
e023c06353
commit
b108b1ee70
@ -1,4 +1,5 @@
|
||||
import { existsSync, promises as fsp, readFileSync } from 'node:fs'
|
||||
import { cpus } from 'node:os'
|
||||
import { join, relative, resolve } from 'pathe'
|
||||
import { build, copyPublicAssets, createDevServer, createNitro, prepare, prerender, scanHandlers, writeTypes } from 'nitropack'
|
||||
import type { Nitro, NitroConfig } from 'nitropack'
|
||||
@ -131,6 +132,8 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
|
||||
.map(dir => ({ dir }))
|
||||
],
|
||||
prerender: {
|
||||
failOnError: true,
|
||||
concurrency: cpus().length * 4 || 4,
|
||||
crawlLinks: nuxt.options._generate ?? undefined,
|
||||
routes: ([] as string[])
|
||||
.concat(nuxt.options.generate.routes)
|
||||
|
Loading…
Reference in New Issue
Block a user