init
This commit is contained in:
26
frontend/vite.config.ts
Normal file
26
frontend/vite.config.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import path from "node:path";
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss()],
|
||||
base: "/app/",
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(new URL(".", import.meta.url).pathname, "./src"),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
// Proxy API requests to the backend server
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:8000", // Default backend address
|
||||
changeOrigin: true,
|
||||
// Optionally rewrite path if needed (e.g., remove /api prefix if backend doesn't expect it)
|
||||
// rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user