mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-06 03:57:50 +08:00
20 lines
410 B
TypeScript
20 lines
410 B
TypeScript
/**
|
|
* @name ConfigVisualizerConfig
|
|
* @description 打包体积分析
|
|
*/
|
|
|
|
import visualizer from 'rollup-plugin-visualizer';
|
|
import { IsReport } from '../../constant';
|
|
|
|
export function ConfigVisualizerConfig() {
|
|
if (IsReport) {
|
|
return visualizer({
|
|
filename: './node_modules/.cache/visualizer/stats.html',
|
|
open: true,
|
|
gzipSize: true,
|
|
brotliSize: true,
|
|
});
|
|
}
|
|
return [];
|
|
}
|