@@ -48,7 +48,8 @@ import {
48
48
requireResolveFromRootWithFallback ,
49
49
} from './utils'
50
50
import { manifestPlugin } from './plugins/manifest'
51
- import type { Logger } from './logger'
51
+ import type { Logger } from './logger' ;
52
+ import { LogLevels } from './logger'
52
53
import { dataURIPlugin } from './plugins/dataUri'
53
54
import { buildImportAnalysisPlugin } from './plugins/importAnalysisBuild'
54
55
import { ssrManifestPlugin } from './ssr/ssrManifestPlugin'
@@ -440,6 +441,7 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
440
441
// commonjsOptions?.include.length !== 0
441
442
const rollupOptionsPlugins = options . rollupOptions . plugins
442
443
const enableNativePlugin = config . experimental . enableNativePlugin
444
+ const shouldLogInfo = LogLevels [ config . logLevel || 'info' ] >= LogLevels . info
443
445
return {
444
446
pre : [
445
447
completeSystemWrapPlugin ( ) ,
@@ -455,7 +457,7 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
455
457
...buildImportAnalysisPlugin ( config ) ,
456
458
...( config . esbuild !== false ? [ buildEsbuildPlugin ( config ) ] : [ ] ) ,
457
459
...( options . minify ? [ terserPlugin ( config ) ] : [ ] ) ,
458
- ...( ! config . isWorker
460
+ ...( ( ! config . isWorker
459
461
? [
460
462
...( options . manifest
461
463
? [
@@ -465,9 +467,10 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
465
467
]
466
468
: [ ] ) ,
467
469
...( options . ssrManifest ? [ ssrManifestPlugin ( config ) ] : [ ] ) ,
468
- buildReporterPlugin ( config ) ,
470
+ shouldLogInfo ? buildReporterPlugin ( config ) : null ,
469
471
]
470
- : [ ] ) ,
472
+ : [ ]
473
+ ) . filter ( Boolean ) as Plugin [ ] ) ,
471
474
enableNativePlugin ? nativeLoadFallbackPlugin ( ) : loadFallbackPlugin ( ) ,
472
475
] ,
473
476
}
0 commit comments