import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; export default defineConfig({ plugins: [react()], optimizeDeps: { exclude: [ "@pubscript/core", "@pubscript/ai", "@pubscript/editor", "@pubscript/ui", "@pubscript/exporters", ], }, server: { host: "0.0.0.0", port: 5173, strictPort: false, allowedHosts: true, proxy: { "/api": { target: process.env.VITE_API_ORIGIN ?? "http://127.0.0.1:8081", changeOrigin: true, }, "/ws": { target: process.env.VITE_WS_ORIGIN ?? "ws://127.0.0.1:8081", ws: true, }, }, }, preview: { host: "0.0.0.0", port: 4173, allowedHosts: true, }, });