monorepo-microservice-rbac/apps/dmp/vite.config.ts

34 lines
781 B
TypeScript
Raw Normal View History

2023-08-27 14:37:59 +08:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { resolve } from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": resolve(__dirname, "src"),
"@@": resolve(__dirname, "core"),
},
},
server: {
port: 5177,
proxy: {
"/api/dmp": {
target: "http://localhost:9012",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
"/cert": {
target: "http://localhost:12144",
changeOrigin: true,
},
"/dicom-web": {
target: "http://localhost:8042/",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/dicom-web\//, "/"),
},
},
},
});