import { fileURLToPath, URL } from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueDevTools from 'vite-plugin-vue-devtools' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), vueDevTools(), ], server: { host: true, open: true, port: 18889, proxy: { // https://cn.vitejs.dev/config/#server-proxy '/dev-api': { target: 'https://www.jaxc.cn/gzpt/', // target: 'https://5da5902884.vicp.fun/', // target: 'https://5590g288c4.goho.co/', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') } } }, resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } } })