24 lines
485 B
TypeScript
24 lines
485 B
TypeScript
import react from "@vitejs/plugin-react-swc";
|
|
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "src"),
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
"/api": {
|
|
target: `http://127.0.0.1:8080`,
|
|
changeOrigin: true,
|
|
secure: false,
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
},
|
|
},
|
|
},
|
|
});
|