2025-11-08 17:56:28 +00:00
|
|
|
import path from "node:path"
|
2025-10-18 14:02:20 +00:00
|
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
|
|
|
import { TanStackRouterVite } from "@tanstack/router-plugin/vite"
|
|
|
|
|
import react from "@vitejs/plugin-react"
|
|
|
|
|
import { defineConfig } from "vite"
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [TanStackRouterVite(), react(), tailwindcss()],
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
server: {
|
|
|
|
|
port: 3000,
|
|
|
|
|
host: true,
|
|
|
|
|
fs: {
|
|
|
|
|
allow: [".."],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
optimizeDeps: {
|
2025-11-08 17:56:28 +00:00
|
|
|
include: ["convex/react", "convex/values", "convex-helpers"],
|
2025-10-18 14:02:20 +00:00
|
|
|
// Workaround for better-auth bug: https://github.com/better-auth/better-auth/issues/4457
|
|
|
|
|
// Vite's esbuild incorrectly transpiles better-call dependency causing 'super' keyword errors
|
|
|
|
|
exclude: ["better-auth", "@convex-dev/better-auth"],
|
|
|
|
|
esbuildOptions: {
|
|
|
|
|
target: "esnext",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|