From 836222c3ce1f8c3fc5a5b6c69956c67e542ce1a6 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Sep 2024 16:21:15 +0200 Subject: [PATCH] print turbopack time --- packages/next/src/build/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/next/src/build/index.ts b/packages/next/src/build/index.ts index 448351d1272921..e25c36f2728b20 100644 --- a/packages/next/src/build/index.ts +++ b/packages/next/src/build/index.ts @@ -1640,11 +1640,13 @@ export default async function build( let shutdownPromise = Promise.resolve() if (!isGenerateMode) { if (turboNextBuild) { + console.time('Turbopack build') const { duration: compilerDuration, shutdownPromise: p, ...rest } = await turbopackBuild() + console.timeEnd('Turbopack build') shutdownPromise = p traceMemoryUsage('Finished build', nextBuildSpan) @@ -1669,6 +1671,7 @@ export default async function build( buildStage: 'compile-server', }) + console.time('webpack build') const serverBuildPromise = webpackBuild(useBuildWorker, [ 'server', ]).then((res) => { @@ -1736,6 +1739,7 @@ export default async function build( durationInSeconds += res.duration traceMemoryUsage('Finished client compilation', nextBuildSpan) }) + console.timeEnd('webpack build') Log.event('Compiled successfully')