1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| import vue from '@vitejs/plugin-vue';
| import vueSetupExtend from 'vite-plugin-vue-setup-extend';
|
|
| import createAutoImport from './auto-import';
| import createSvgIcon from './svg-icon';
| import createCompression from './compression';
|
| const createVitePlugins = (viteEnv, isBuild = false) => {
| const vitePlugins = [
| vue(),
| createAutoImport(),
| vueSetupExtend(),
| createSvgIcon(isBuild)
| ];
| isBuild && vitePlugins.push(...createCompression(viteEnv));
| return vitePlugins;
| };
|
| export default createVitePlugins;
|
|