28 lines
575 B
TypeScript
28 lines
575 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 3002,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://127.0.0.1:3003",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
},
|
|
},
|
|
preview: {
|
|
port: 3002,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://127.0.0.1:3003",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
},
|
|
},
|
|
});
|