visualizer.ts 434 B

12345678910111213141516171819
  1. /**
  2. * Package file volume analysis
  3. */
  4. import visualizer from 'rollup-plugin-visualizer'
  5. import type { PluginOption } from 'vite'
  6. import { isReportMode } from '../../utils'
  7. export function configVisualizerConfig() {
  8. if (isReportMode()) {
  9. return visualizer({
  10. filename: './node_modules/.cache/visualizer/stats.html',
  11. open: true,
  12. gzipSize: true,
  13. brotliSize: true,
  14. }) as PluginOption
  15. }
  16. return []
  17. }