import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; import path from "path"; function errorReporterPlugin() { return { name: 'error-reporter', transformIndexHtml(html) { return html.replace( '
', `
` ); }, }; } export default defineConfig({ plugins: [ errorReporterPlugin(), react(), tailwindcss(), ], resolve: { alias: { "@": path.resolve(__dirname, "src"), }, }, root: ".", base: "/vessels/", server: { host: "0.0.0.0", port: 9090, allowedHosts: true, }, build: { outDir: "dist", sourcemap: true, }, optimizeDeps: { include: [ "react", "react-dom", "react-dom/client", "react/jsx-runtime", "react/jsx-dev-runtime", "framer-motion", "lucide-react", "wouter", "@tanstack/react-query", "@tanstack/query-persist-client-core", "@tanstack/query-sync-storage-persister", "recharts", "mapbox-gl", "sonner", ], }, });