CodeTorso
CodeTorso3mo ago

Is there no way to get static pages in next js when using convex with convex Auth

I have tried both moving <ConvexAuthNextjsServerProvider>into a deeper layout and adding exceptions in middleware.ts
matcher: [
"/((?!.*\\..*|_next).*)",
"/",
"/home",
"/(api|trpc)(.*)",
],
matcher: [
"/((?!.*\\..*|_next).*)",
"/",
"/home",
"/(api|trpc)(.*)",
],
but still all my routes are considered as dynamic and getting server rendered for each request
┌ ƒ /
├ ƒ /_not-found
├ ƒ /home
├ ƒ /imp
├ ƒ /server
└ ƒ /signin
┌ ƒ /
├ ƒ /_not-found
├ ƒ /home
├ ƒ /imp
├ ƒ /server
└ ƒ /signin
2 Replies
erquhart
erquhart2mo ago
Are you trying to do SSG with the pages router?
CodeTorso
CodeTorsoOP2mo ago
we talked about this in better-auth section before the issue is we are using middleware and convexAuthNextServerProvider which makes all router dynamic including landing pages, I found this is similar case in clerk so no issue now I am using better auth now and on dashboard I mostly do client side so navigation is fast now

Did you find this page helpful?