You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
957 B
33 lines
957 B
import { mergeConfig } from 'vite';
|
|
import baseConfig from './vite.config.base';
|
|
import configCompressPlugin from './plugin/compress';
|
|
import configVisualizerPlugin from './plugin/visualizer';
|
|
import configArcoResolverPlugin from './plugin/arcoResolver';
|
|
import configStyleImportPlugin from './plugin/styleImport';
|
|
import configImageminPlugin from './plugin/imagemin';
|
|
|
|
export default mergeConfig(
|
|
{
|
|
mode: 'production',
|
|
plugins: [
|
|
configCompressPlugin('gzip'),
|
|
configVisualizerPlugin(),
|
|
configArcoResolverPlugin(),
|
|
configStyleImportPlugin(),
|
|
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
|
|
);
|
|
|