chore: initial commit
This commit is contained in:
31
frontend/packages/web/config/vite.config.prod.ts
Normal file
31
frontend/packages/web/config/vite.config.prod.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import configCompressPlugin from './plugin/compress';
|
||||
import configVisualizerPlugin from './plugin/visualizer';
|
||||
import baseConfig from './vite.config.base';
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
import { mergeConfig } from 'vite';
|
||||
|
||||
export default mergeConfig(
|
||||
{
|
||||
mode: 'production',
|
||||
plugins: [
|
||||
configCompressPlugin('gzip'),
|
||||
configVisualizerPlugin(),
|
||||
// 兼容性配置,配合package.json中的browserslist使用
|
||||
legacy({
|
||||
targets: ['defaults', 'not IE 11'],
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
vue: ['vue', 'vue-router', 'pinia', '@vueuse/core', 'vue-i18n'],
|
||||
chart: ['echarts', 'vue-echarts'],
|
||||
},
|
||||
},
|
||||
},
|
||||
chunkSizeWarningLimit: 2000,
|
||||
},
|
||||
},
|
||||
baseConfig
|
||||
);
|
||||
Reference in New Issue
Block a user