Skip to content

Commit f652b86

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/vite/src/node/build.ts

Lines changed: 5 additions & 1 deletion
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(
@@ -522,7 +524,9 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
522524
})
523525
: manifestPlugin(),
524526
ssrManifestPlugin(),
525-
buildReporterPlugin(config),
527+
...(config.build.enableBuildReport
528+
? [buildReporterPlugin(config)]
529+
: []),
526530
]
527531
: []),
528532
enableNativePlugin === true

0 commit comments

Comments
 (0)