From 50c92fbe6cfb5ce4d5bd51ffdbc7f6da2b1ddf65 Mon Sep 17 00:00:00 2001 From: Pothuraju Date: Fri, 29 Mar 2024 18:08:44 +0530 Subject: [PATCH] docs: add note about `prerenderRoutes` in dynamic routes (#26547) --- docs/3.api/3.utils/prerender-routes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/3.api/3.utils/prerender-routes.md b/docs/3.api/3.utils/prerender-routes.md index 0b679c49e0..a806678bfd 100644 --- a/docs/3.api/3.utils/prerender-routes.md +++ b/docs/3.api/3.utils/prerender-routes.md @@ -14,6 +14,10 @@ When prerendering, you can hint to Nitro to prerender additional paths, even if `prerenderRoutes` can only be called within the [Nuxt context](/docs/guide/going-further/nuxt-app#the-nuxt-context). :: +::note +`prerenderRoutes` has to be executed during prerendering. If the `prerenderRoutes` is used in dynamic pages/routes which are not prerendered, then it will not be executed. +:: + ```js const route = useRoute()