is there a way to compile two routes in parallel?
Unanswered
Polar bear posted this in #help-forum
Polar bearOP
when I start my local next server, there is an auth route that must be compiled regardless. for example, If i go to
/start
on the browser, /auth/[auth]
must be compiled in order for auth to work. however, /auth[auth]
only gets compiled after /start
is compiled.2 Replies
@Polar bear when I start my local next server, there is an auth route that must be compiled regardless. for example, If i go to `/start` on the browser, `/auth/[auth]` must be compiled in order for auth to work. however, `/auth[auth]` only gets compiled after `/start` is compiled.
the nextjs dev server only compiles a route when a request hits it, so you need to come up with a way to hit both routes at the same time
technically you could come up with something for that, i don't think that spaghetti is worth the couple seconds saved
technically you could come up with something for that, i don't think that spaghetti is worth the couple seconds saved
Polar bearOP
Yeah I get that, it also depends how long that other route takes to compile. My use case is only one additional route but I am sure others have different use case. And this depends on how the spaghetti looks like but it seems like this is an optional feature that people want!