MeterSphere/frontend/config/vite.config.prod.ts

25 lines
665 B
TypeScript
Raw Normal View History

2023-05-24 11:08:08 +08:00
import configCompressPlugin from './plugin/compress';
import configVisualizerPlugin from './plugin/visualizer';
import baseConfig from './vite.config.base';
import { mergeConfig } from 'vite';
2023-05-24 11:08:08 +08:00
export default mergeConfig(
{
mode: 'production',
plugins: [configCompressPlugin('gzip'), configVisualizerPlugin()],
2023-05-24 11:08:08 +08:00
build: {
rollupOptions: {
output: {
manualChunks: {
2023-08-07 18:07:57 +08:00
vue: ['vue', 'vue-router', 'pinia', '@vueuse/core', 'vue-i18n'],
2023-05-24 11:08:08 +08:00
arco: ['@arco-design/web-vue'],
chart: ['echarts', 'vue-echarts'],
},
},
},
chunkSizeWarningLimit: 2000,
},
},
baseConfig
);