import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; import { TanStackRouterVite } from "@tanstack/router-plugin/vite"; import path from "node:path"; export default defineConfig({ plugins: [ TanStackRouterVite({ routesDirectory: "./src/routes", generatedRouteTree: "./src/routeTree.gen.ts", quoteStyle: "double", }), react(), tailwindcss(), ], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, }, server: { port: 3000, proxy: { "/api": { target: "http://localhost:4000", changeOrigin: true, }, }, }, build: { outDir: "dist", // 'hidden' emits source maps but strips the //# sourceMappingURL comment // from JS bundles. Sentry can still consume them (via release upload), but // browsers won't fetch them, so end-user stack traces stay minified. sourcemap: "hidden", }, });