2022-08-05 23:04:04 +08:00

18 lines
344 B
TypeScript

import vue from './vue';
import compress from './compress';
/**
* @description: 设置vite插件配置
* @param {*} viteEnv - 环境变量配置
* @return {*}
*/
export function setVitePlugins(viteEnv) {
const plugins = [...vue];
if (viteEnv.VITE_COMPRESS_OPEN === 'Y') {
plugins.push(compress(viteEnv));
}
return plugins;
}