This commit is contained in:
仲么了
2024-01-05 15:14:35 +08:00
parent 379732c7d5
commit ae1ae5b2a7
7 changed files with 263 additions and 268 deletions

View File

@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import path from 'path'
const nodeResolve = (dir: string) => path.resolve(__dirname, '.', dir)
// https://vitejs.dev/config/
export default defineConfig({
@@ -10,7 +11,7 @@ export default defineConfig({
proxy: {
'/api': {
// target: 'http://192.168.1.81:10215', //数据中心
target: 'https://pqmcn.com:8092/api', //数据中心
target: 'http://192.168.1.22:10215', //治理
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
}