- OpenAPI: add missing endpoints (add-from-url, subscriptions, public availability) - OpenAPI: CalendarSubscription schema, Subscriptions tag - Frontend app - Migrations: count_for_availability, subscriptions_sync, user_preferences, calendar_settings - Config, rate limit, auth, calendar, booking, ICS, availability, user service updates Made-with: Cursor
41 lines
998 B
TypeScript
41 lines
998 B
TypeScript
import { defineConfig, loadEnv } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), "");
|
|
const apiUrl = env.VITE_API_URL || "http://localhost:8080";
|
|
|
|
return {
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/auth": apiUrl,
|
|
"/users": apiUrl,
|
|
"/calendars": apiUrl,
|
|
"/events": apiUrl,
|
|
"/contacts": apiUrl,
|
|
"/availability": apiUrl,
|
|
"/booking": apiUrl,
|
|
"/api-keys": apiUrl,
|
|
"/cal": apiUrl,
|
|
"/openapi.json": apiUrl,
|
|
"/docs": apiUrl,
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
sourcemap: mode !== "production",
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vendor: ["react", "react-dom", "react-router-dom"],
|
|
date: ["date-fns"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|