Skip to content

Commit adc78dc

Browse files
feat: add an new option to disable build report
Co-Authored-By: IWANABETHATGUY <[email protected]>
1 parent 3dfcbfc commit adc78dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/vite/src/node/build.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ export interface BuildEnvironmentOptions {
287287
name: string,
288288
config: ResolvedConfig,
289289
) => Promise<BuildEnvironment> | BuildEnvironment
290+
enableBuildReport?: boolean
290291
}
291292

292293
export type BuildOptions = BuildEnvironmentOptions
@@ -395,6 +396,7 @@ export const buildEnvironmentOptionsDefaults = Object.freeze({
395396
chunkSizeWarningLimit: 500,
396397
watch: null,
397398
// createEnvironment
399+
enableBuildReport: true,
398400
})
399401

400402
export function resolveBuildEnvironmentOptions(
@@ -524,7 +526,9 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
524526
})
525527
: manifestPlugin(),
526528
ssrManifestPlugin(),
527-
buildReporterPlugin(config),
529+
...(config.build.enableBuildReport
530+
? [buildReporterPlugin(config)]
531+
: []),
528532
]
529533
: []),
530534
enableNativePlugin === true

0 commit comments

Comments
 (0)