fix: mitigate netlify javascript heap out of memory issue

pull/4660/head
Yuxuan Zhang 6 months ago
parent b5dfa185f9
commit 72627effb3
No known key found for this signature in database
GPG Key ID: 6910B04F3351EF7D

@ -5,6 +5,15 @@ import {
localIconLoader
} from 'vitepress-plugin-group-icons'
let buildConcurrency: number
try {
const { cpus } = await import('os')
buildConcurrency = 4 * cpus().length
} catch {
// edge services may not expose os module
buildConcurrency = 16
}
export default defineConfig({
title: 'VitePress',
@ -15,6 +24,7 @@ export default defineConfig({
lastUpdated: true,
cleanUrls: true,
metaChunk: true,
buildConcurrency,
markdown: {
math: true,

Loading…
Cancel
Save