diff --git a/src/node/build/build.ts b/src/node/build/build.ts index 3de81d06..853cc1a3 100644 --- a/src/node/build/build.ts +++ b/src/node/build/build.ts @@ -65,18 +65,20 @@ export async function build( const pages = ['404.md', ...siteConfig.pages] - for (const page of pages) { - await renderPage( - render, - siteConfig, - page, - clientResult, - appChunk, - cssChunk, - pageToHashMap, - hashMapString + await Promise.all( + pages.map((page) => + renderPage( + render, + siteConfig, + page, + clientResult, + appChunk, + cssChunk, + pageToHashMap, + hashMapString + ) ) - } + ) } catch (e) { spinner.stopAndPersist({ symbol: failMark