MeterSphere/frontend/config/plugin/visualizer.ts

19 lines
409 B
TypeScript
Raw Normal View History

2023-05-24 11:08:08 +08:00
/**
* Generation packaging analysis
*
*/
import { isReportMode } from '../utils';
import visualizer from 'rollup-plugin-visualizer';
2023-05-24 11:08:08 +08:00
export default function configVisualizerPlugin() {
if (isReportMode()) {
return visualizer({
filename: './node_modules/.cache/visualizer/stats.html',
open: true,
gzipSize: true,
brotliSize: true,
});
}
return [];
}