vite.config.ts 649 B

123456789101112131415161718192021222324252627
  1. import { UserConfig } from 'vite';
  2. import WindiCSS from 'vite-plugin-windicss';
  3. import Icons, { ViteIconsResolver } from 'vite-plugin-icons';
  4. import Components from 'vite-plugin-components';
  5. const config: UserConfig = {
  6. optimizeDeps: {
  7. exclude: ['vue-demi', '@vueuse/shared', '@vueuse/core'],
  8. },
  9. plugins: [
  10. Components({
  11. dirs: ['.vitepress/theme/components'],
  12. customLoaderMatcher: (id) => id.endsWith('.md'),
  13. customComponentResolvers: [
  14. ViteIconsResolver({
  15. componentPrefix: '',
  16. }),
  17. ],
  18. }),
  19. Icons(),
  20. WindiCSS({
  21. preflight: false,
  22. }),
  23. ],
  24. };
  25. export default config;