make build concurrency configurable

pull/3366/head
Divyansh Singh 2 years ago
parent d16e67a02a
commit 8891b2609e

@ -123,7 +123,7 @@ export async function build(
additionalHeadTags
)
},
{ concurrency: 64 }
{ concurrency: siteConfig.buildConcurrency }
)
})

@ -141,7 +141,8 @@ export async function resolveConfig(
transformPageData: userConfig.transformPageData,
rewrites,
userConfig,
sitemap: userConfig.sitemap
sitemap: userConfig.sitemap,
buildConcurrency: userConfig.buildConcurrency ?? 64
}
// to be shared with content loaders

@ -147,6 +147,15 @@ export interface UserConfig<ThemeConfig = any>
*/
useWebFonts?: boolean
/**
* This option allows you to configure the concurrency of the build.
* A lower number will reduce the memory usage but will increase the build time.
*
* @experimental
* @default 64
*/
buildConcurrency?: number
/**
* @experimental
*
@ -240,4 +249,5 @@ export interface SiteConfig<ThemeConfig = any>
}
logger: Logger
userConfig: UserConfig
buildConcurrency: number
}

Loading…
Cancel
Save