Files
myDrive/vite.config.ts
T

19 lines
458 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
resolve: {
extensions: [".js", ".jsx", ".ts", ".tsx"], // Include these extensions
},
server: {
proxy: {
"/api": {
target: "http://localhost:3000", // The port where your backend is running
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
});