mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
Add generate.concurrency option
This commit is contained in:
parent
9e2c4b9761
commit
270c490a9d
@ -68,7 +68,7 @@ export default class Generator extends Tapable {
|
||||
// Start generate process
|
||||
while (routes.length) {
|
||||
let n = 0
|
||||
await Promise.all(routes.splice(0, 500).map(async ({ route, payload }) => {
|
||||
await Promise.all(routes.splice(0, this.options.generate.concurrency).map(async ({ route, payload }) => {
|
||||
await waitFor(n++ * this.options.generate.interval)
|
||||
await this.generateRoute({route, payload, errors})
|
||||
}))
|
||||
|
@ -74,6 +74,7 @@ export const defaultOptions = {
|
||||
generate: {
|
||||
dir: 'dist',
|
||||
routes: [],
|
||||
concurrency: 500,
|
||||
interval: 0,
|
||||
minify: {
|
||||
collapseBooleanAttributes: true,
|
||||
|
Loading…
Reference in New Issue
Block a user