I'm trying to deploy a TanStack Start app on Vercel and I've followed the guide to deploy on these platforms but I've ran into a problem where it asks me to mark some Convex components as external from the bundle, which I did following what better-auth+convex docs suggest, but no success.
// vite.config.ts
export default defineConfig({
ssr: {
noExternal: [
"@convex-dev/r2",
"@convex-dev/twilio",
"@convex-dev/aggregate",
"@convex-dev/presence",
"@convex-dev/rate-limiter",
],
},
plugins: [
devtools(),
nitro({
vercel: {
functions: {
runtime: "bun1.x",
},
},
}),
// this is the plugin that enables path aliases
viteTsConfigPaths({
projects: ["./tsconfig.json"],
}),
tailwindcss(),
tanstackStart(),
viteReact({
babel: {
plugins: ["babel-plugin-react-compiler"],
},
}),
],
});
// package.json
{
"dev:web": "bun --bun vite dev --host --port 3000",
"dev:convex": "bunx convex dev",
"build:web": "bun --bun vite build",
"build": "bunx convex deploy --cmd 'bun --bun vite build'"
}