import { defineConfig } from 'vite' import plugins from './config/plugins' export default defineConfig({ resolve: { alias: { "@/": "/src/", // 指向 `src` 目录 "@com/": "/src/components/", // 组件位置 "@img/": "/src/assets/img/", // 图片位置 }, }, plugins: [...plugins()], server: { cors: true, // 允许跨域 port: 3333, proxy: (() => { // http://192.168.16.47:9006/swagger/index.html //const target = 'http://10.0.10.154:7085/'; // const target = 'http://10.0.10.154:7085/'; // const target = 'http://192.168.5.143:7085/'; const target = 'http://localhost:7085/'; // const target = 'http://192.168.0.112:7085/' // const target = 'http://192.168.5.140:7085'; return { "/Api": { target, changeOrigin:true, }, "/UploadFile":{ target, changeOrigin:true, }, /*数据中台*/ "/edg":{ target: 'http://192.168.0.110:8080/', changeOrigin:true, }, /*minio文件服务*/ "/sjzyxt":{ target: 'http://192.168.0.110:9000/', // target: 'http://192.168.0.110:9000/', changeOrigin:true, }, /*kkFileView*/ "/onlinePreview":{ target: 'http://127.0.0.1:8012/', changeOrigin:true, }, "/js":{ target: 'http://127.0.0.1:8012/', changeOrigin:true, } } })() } })