wireguard-dashboard-admin/build/vite/plugin/index.js
zhangchuanlong 8d0158be7c first commit
2022-01-08 17:20:46 +08:00

13 lines
375 B
JavaScript

import vue from '@vitejs/plugin-vue'
import { configHtmlPlugin } from './html'
import { configMockPlugin } from './mock'
import { unocss } from './unocss'
export function createVitePlugins(viteEnv, isBuild) {
const plugins = [vue(), unocss(), configHtmlPlugin(viteEnv, isBuild)]
viteEnv?.VITE_APP_USE_MOCK && plugins.push(configMockPlugin(isBuild))
return plugins
}