19 lines
407 B
TypeScript
19 lines
407 B
TypeScript
import react from "@vitejs/plugin-react-swc";
|
|
import { defineConfig } from "vite";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
"/api": {
|
|
target: `http://127.0.0.1:3000`,
|
|
changeOrigin: true,
|
|
secure: false,
|
|
rewrite: (path) => path.replace(/^\/api/, proxyHost.Path),
|
|
},
|
|
},
|
|
},
|
|
});
|