vite.config.mts 670 B

1234567891011121314151617181920212223242526272829
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import AutoImport from 'unplugin-auto-import/vite'
  5. import Components from 'unplugin-vue-components/vite'
  6. import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
  7. // https://vitejs.dev/config/
  8. export default defineConfig({
  9. base: '',
  10. plugins: [
  11. vue(),
  12. AutoImport({
  13. resolvers: [ElementPlusResolver()],
  14. }),
  15. Components({
  16. resolvers: [ElementPlusResolver()],
  17. }),
  18. ],
  19. resolve: {
  20. alias: {
  21. '@': fileURLToPath(new URL('./src', import.meta.url)),
  22. },
  23. },
  24. build: {
  25. assetsDir: '',
  26. },
  27. })