vite.config.ts 851 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import vueJsx from '@vitejs/plugin-vue-jsx'
  5. import nightwatchPlugin from 'vite-plugin-nightwatch'
  6. import Components from 'unplugin-vue-components/vite';
  7. import { svgLoader } from './vitePlugin/SVGLoader'
  8. import {AntDesignVueResolver} from "unplugin-vue-components/resolvers";
  9. // https://vitejs.dev/config/
  10. export default defineConfig({
  11. plugins: [
  12. vue(),
  13. vueJsx(),
  14. svgLoader('./src/assets/svg/'),
  15. nightwatchPlugin({
  16. renderPage: './nightwatch/index.html'
  17. }),
  18. Components({
  19. resolvers: [
  20. AntDesignVueResolver({
  21. importStyle: false, // css in js
  22. }),
  23. ],
  24. }),
  25. ],
  26. resolve: {
  27. alias: {
  28. '@': fileURLToPath(new URL('./src', import.meta.url))
  29. }
  30. }
  31. })