import tailwindcss from "@tailwindcss/vite"; import react from "@vitejs/plugin-react"; import vike from "vike/plugin"; import { defineConfig } from "vite"; export default defineConfig({ plugins: [vike(), react(), tailwindcss()], build: { target: "es2022", }, server: { // Proxy API requests to the backend server during local development // In production, both frontend and API are served from the same origin proxy: { '/api': { target: process.env.VITE_API_TARGET || 'http://localhost:3001', changeOrigin: true, }, }, }, });