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

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))
}
}
})