You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
884 B
TypeScript
25 lines
884 B
TypeScript
3 weeks ago
|
import vue from '@vitejs/plugin-vue';
|
||
|
import createUnoCss from './unocss';
|
||
|
import createAutoImport from './auto-import';
|
||
|
import createComponents from './components';
|
||
|
import createIcons from './icons';
|
||
|
import createSvgIconsPlugin from './svg-icon';
|
||
|
import createCompression from './compression';
|
||
|
import createSetupExtend from './setup-extend';
|
||
|
import createI18n from './i18n';
|
||
|
import path from 'path';
|
||
|
|
||
|
export default (viteEnv: any, isBuild = false): [] => {
|
||
|
const vitePlugins: any = [];
|
||
|
vitePlugins.push(vue());
|
||
|
vitePlugins.push(createUnoCss());
|
||
|
vitePlugins.push(createAutoImport(path));
|
||
|
vitePlugins.push(createComponents(path));
|
||
|
vitePlugins.push(createCompression(viteEnv));
|
||
|
vitePlugins.push(createIcons());
|
||
|
vitePlugins.push(createSvgIconsPlugin(path, isBuild));
|
||
|
vitePlugins.push(createSetupExtend());
|
||
|
vitePlugins.push(createI18n(path));
|
||
|
return vitePlugins;
|
||
|
};
|