2023-05-24 11:08:08 +08:00
|
|
|
import configCompressPlugin from './plugin/compress';
|
|
|
|
import configImageminPlugin from './plugin/imagemin';
|
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',
|
|
|
|
plugins: [configCompressPlugin('gzip'), configVisualizerPlugin(), configImageminPlugin()],
|
|
|
|
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
|
|
|
|
);
|