2023-05-24 11:08:08 +08:00
|
|
|
import configCompressPlugin from './plugin/compress';
|
2023-10-17 10:35:21 +08:00
|
|
|
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',
|
2024-04-25 10:16:50 +08:00
|
|
|
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
|
|
|
|
);
|