midway.config.ts 586 B

123456789101112131415161718192021222324
  1. import vue from '@vitejs/plugin-vue';
  2. import { defineConfig } from '@midwayjs/hooks-kit';
  3. import AutoImport from 'unplugin-auto-import/vite';
  4. import Components from 'unplugin-vue-components/vite';
  5. import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
  6. export default defineConfig({
  7. vite: {
  8. plugins: [
  9. vue(),
  10. AutoImport({
  11. resolvers: [ElementPlusResolver()],
  12. }),
  13. Components({
  14. resolvers: [ElementPlusResolver()],
  15. }),
  16. ],
  17. server: {
  18. port: 27011,
  19. hmr: {
  20. overlay: false,
  21. },
  22. },
  23. },
  24. });