Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/nuxt-cli/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { relative } from 'pathe'
import { resolveDotenvFileNames } from '../utils/args'
import { showBanner } from '../utils/banner'
import { BuildProgress } from '../utils/build-progress'
import { collectClientBundle, formatClientBundle } from '../utils/client-bundle'
import { overrideEnv } from '../utils/env'

import { ActionableError } from '../utils/errors'
Expand All @@ -20,6 +21,7 @@ import { createPhaseReporter, formatPhaseBreakdown } from '../utils/phase-report
import { startCpuProfile, stopCpuProfile } from '../utils/profile'
import { resolveServerBuild } from '../utils/server-build'
import { quietServerOutput } from '../utils/server-output'
import { blankLineBefore } from '../utils/stdout'
import { dotEnvArgs, envNameArgs, extendsArgs, logLevelArgs, profileArgs, rootDirArgs, targetArgs } from './_shared'

/** How often a phase repeats itself where there is no animated line. */
Expand Down Expand Up @@ -108,6 +110,7 @@ export default defineCommand({

progress.attachNuxt(nuxt)
const serverOutput = quietServerOutput(nuxt)
const clientBundle = ctx.args.logLevel === 'silent' ? undefined : collectClientBundle(nuxt)

showBanner(nuxt)
await nuxt.ready()
Expand Down Expand Up @@ -146,6 +149,11 @@ export default defineCommand({
stopReporting()
progress.finish()

const bundle = clientBundle?.()
if (bundle) {
logger.message(`${blankLineBefore()}${formatClientBundle(bundle, process.stdout.columns || 80)}\n`)
}

const serverSummary = serverOutput.summary()
if (serverSummary) {
logger.success(serverSummary)
Expand Down
Loading
Loading