visualizer.ts 404 B

123456789101112131415161718
  1. /**
  2. * Generation packaging analysis
  3. * 生成打包分析
  4. */
  5. import visualizer from 'rollup-plugin-visualizer'
  6. import { isReportMode } from '../utils'
  7. export default function configVisualizerPlugin() {
  8. if (isReportMode()) {
  9. return visualizer({
  10. filename: './node_modules/.cache/visualizer/stats.html',
  11. open: true,
  12. gzipSize: true,
  13. brotliSize: true
  14. })
  15. }
  16. return []
  17. }