您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
658B

  1. import vue from '@vitejs/plugin-vue'
  2. import Components from 'unplugin-vue-components/vite'
  3. import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
  4. import VueSetupExtend from 'vite-plugin-vue-setup-extend'
  5. import { unocss } from './unocss'
  6. import { configHtmlPlugin } from './html'
  7. import { configMockPlugin } from './mock'
  8. export function createVitePlugins(viteEnv, isBuild) {
  9. const plugins = [
  10. vue(),
  11. Components({
  12. resolvers: [NaiveUiResolver()]
  13. }),
  14. VueSetupExtend(),
  15. unocss(),
  16. configHtmlPlugin(viteEnv, isBuild)
  17. ]
  18. viteEnv?.VITE_APP_USE_MOCK && plugins.push(configMockPlugin(isBuild))
  19. return plugins
  20. }