I am using Tanstack query v5 to prefetch the initial infiniteQuery get request in the top RSC component using HydrationBoundary and hydrate and dehydrate Tanstack API. When testing locally, I can see that I get the initial data instantly with no network request. So far everything is great!
The problem is that we are working in a SaaS environment with multitenancy.
Because we have different subscribers, the setup of the correct backend URL prefix is a challenge during the data prefetch while "next build" is running, because at that point in time, we don't know the tenant/subscriber yet. This build process is happening on the developer machine and the build folder is being sent to the correct cloud environment. Is there a possible way to tell NextJS to not prefetch during build for the time being?