You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
772 B

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import vueDevTools from 'vite-plugin-vue-devtools'
  5. // https://vitejs.dev/config/
  6. export default defineConfig({
  7. plugins: [
  8. vue(),
  9. vueDevTools(),
  10. ],
  11. server: {
  12. host: true,
  13. open: true,
  14. port: 18889,
  15. proxy: {
  16. // https://cn.vitejs.dev/config/#server-proxy
  17. '/dev-api': {
  18. target: 'https://www.jaxc.cn/gzpt/',
  19. // target: 'https://5da5902884.vicp.fun/',
  20. // target: 'https://5590g288c4.goho.co/',
  21. changeOrigin: true,
  22. rewrite: (p) => p.replace(/^\/dev-api/, '')
  23. }
  24. }
  25. },
  26. resolve: {
  27. alias: {
  28. '@': fileURLToPath(new URL('./src', import.meta.url))
  29. }
  30. }
  31. })