admin-vben/build/vite/plugin/visualizer.ts

19 lines
434 B
TypeScript
Raw Normal View History

2023-03-18 13:10:54 +00:00
/**
* Package file volume analysis
*/
import visualizer from 'rollup-plugin-visualizer'
2023-07-29 10:46:43 +00:00
import type { PluginOption } from 'vite'
2023-03-18 13:10:54 +00:00
import { isReportMode } from '../../utils'
export function configVisualizerConfig() {
if (isReportMode()) {
return visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gzipSize: true,
2023-07-29 10:46:43 +00:00
brotliSize: true,
2023-04-02 13:47:03 +00:00
}) as PluginOption
2023-03-18 13:10:54 +00:00
}
return []
}