mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-06 20:02:38 +00:00
29 lines
768 B
TypeScript
29 lines
768 B
TypeScript
import { mergeConfig } from 'vite';
|
|
import baseConfig from './vite.config.base';
|
|
import configCompressPlugin from './plugin/compress';
|
|
import configVisualizerPlugin from './plugin/visualizer';
|
|
import configImageminPlugin from './plugin/imagemin';
|
|
|
|
export default mergeConfig(
|
|
{
|
|
mode: 'production',
|
|
plugins: [
|
|
configCompressPlugin('gzip'),
|
|
configVisualizerPlugin(),
|
|
configImageminPlugin(),
|
|
],
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
arco: ['@arco-design/web-vue'],
|
|
chart: ['echarts', 'vue-echarts'],
|
|
vue: ['vue', 'vue-router', 'pinia', '@vueuse/core', 'vue-i18n'],
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 2000,
|
|
},
|
|
},
|
|
baseConfig
|
|
);
|