We're building a NextJS app using JSS 20.
Next's prefetching behavior differs from local development: On production environments any links on a page are prefetched (for performance reasons), on local development Next will fetch an URL whenever you browse to it.
Is there a way to make Sitecore JSS NextJS behave like that on production environments as well? We don't want to prefetch all pages, we want Next to fetch the target page whenever we click a link, just like it does in
I'm quite sure I've seen Sitecore JSS NextJS sites behave like this on production mode, but can't figure out how. Neither Sitecore or NextJS seems to have any decent documentation about it.
We're running our NextJS app on Azure Container Apps using Docker. The docker command is
RUN npm run build and
cmd npm start.