Cache Components, duplicate route names in build output #89290
-
|
Hi. I want to ask whether this is a bug. Why does the output show duplicate routes like this? It only happens for dynamic routes. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Mmm likely some filtering is missing on the printing step. x-ref: #89344 |
Beta Was this translation helpful? Give feedback.
-
|
Hi @yusifaliyevpro! This is not a bug, but rather the expected build output format when using Partial Prerendering (PPR) . The duplicate looking lines represent the two different phases of the route rendering:
The legend at the bottom confirms this with the ◐ symbol:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the answer. Adding extra indicators in the build output, such as ○, ◐, or ƒ, would help. Otherwise, people may wonder why this happened and end up searching the Next.js docs or discussions. |
Beta Was this translation helpful? Give feedback.
Ok, so this is intentional, even found a test for it, but my justification is as follows:
The top level (├ ◐ /[username]/posts): This is the route definition - the file that exists in your app directory.
Nested items (│ └ /[username]/posts): These show what was actually prerendered as static shells. In this case, a fallback static shell was generated for the dynamic pattern itself.
This is more noticeable and helpful for permutations on routes with multiple dynamic segments. For example
/[category]/[slug]in something like: