Makes bundle visualizer output JSON when in CI (#37633)

This commit is contained in:
Echo 2026-01-27 16:03:00 +01:00 committed by GitHub
parent 76ab866d93
commit 7a7c42b50c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,7 +214,10 @@ export const config: UserConfigFnPromise = async ({ mode, command }) => {
svgr(),
// Old library types need to be converted
optimizeLodashImports() as PluginOption,
!!process.env.ANALYZE_BUNDLE_SIZE && (visualizer() as PluginOption),
!!process.env.ANALYZE_BUNDLE_SIZE &&
(visualizer({
template: process.env.CI ? 'raw-data' : 'treemap',
}) as PluginOption),
MastodonNameLookup(),
],
} satisfies UserConfig;