next.js
8cc2dd0e - Add prerender indicator for app router (#67306)

Commit
1 year ago
Add prerender indicator for app router (#67306) ## Background Currently in app router during development all pages are dynamic rendered and streamed since we don't know if a page will be prerendered until after the page is rendered. During build time we do a render pass for each path and if it doesn't bail from static generation it is considered prerendered/ISR'd. Since it can be tricky to track all the bail outs for static generation and doing numerous builds to track this isn't feasible we want to have some sort of signal in development to show if it would have been prerendered. ## New Handling To alleviate the above pain point we are planning to bring back the prerendered indicator from pages initially and have a config to disable if desired. We are also going to investigate other possible indicators potentially through headers or similar. <details> <summary>Preview</summary> ![CleanShot 2024-06-29 at 08 56 11@2x](https://github.com/vercel/next.js/assets/22380829/37d4d351-903d-49a2-9541-932e7d5a1e54) ![CleanShot 2024-06-29 at 08 55 46@2x](https://github.com/vercel/next.js/assets/22380829/8356f287-e0d0-4c37-aa1e-1f08639dd478) </details> --------- Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Author
Parents
Loading