wireguard-dashboard-admin/build/vite/plugin/index.js

14 lines
451 B
JavaScript
Raw Normal View History

2022-01-08 17:20:46 +08:00
import vue from '@vitejs/plugin-vue'
import VueSetupExtend from 'vite-plugin-vue-setup-extend'
import { unocss } from './unocss'
2022-01-08 17:20:46 +08:00
import { configHtmlPlugin } from './html'
import { configMockPlugin } from './mock'
export function createVitePlugins(viteEnv, isBuild) {
const plugins = [vue(), VueSetupExtend(), unocss(), configHtmlPlugin(viteEnv, isBuild)]
2022-01-08 17:20:46 +08:00
viteEnv?.VITE_APP_USE_MOCK && plugins.push(configMockPlugin(isBuild))
return plugins
}