next.js
396fed36 - Remove bailed out SSG routes from the list of SSG (#83861)

Commit
223 days ago
Remove bailed out SSG routes from the list of SSG (#83861) ### Why? When SSG, the pages can bail out when detected a dynamic usage. However, the routes that bailed out were still marked as SSG, which can confuse the users. ### How? Remove the bailed-out routes from the SSG routes list. If there are no more SSG routes for the dynamic route, mark it as dynamic in Build CLI. #### Before - Has 1, 2, 3, even though they bailed. ``` Route (app) Size First Load JS ┌ ○ /_not-found 0 B 114 kB └ ● /[id] 0 B 114 kB ├ /1 ├ /2 └ /3 + First Load JS shared by all 114 kB ├ chunks/29c57ad6b43f6070.js 75.8 kB ├ chunks/df142624801412ea.js 24.3 kB └ other shared chunks (total) 13.5 kB ○ (Static) prerendered as static content ● (SSG) prerendered as static HTML (uses generateStaticParams) ``` #### After - No longer has 1, 2, 3, and the route is marked as dynamic. ``` Route (app) Size First Load JS ┌ ○ /_not-found 0 B 114 kB └ ƒ /[id] 0 B 114 kB + First Load JS shared by all 114 kB ├ chunks/4963d796c068bb13.js 24.3 kB ├ chunks/f59bbf014aa0eff6.js 75.8 kB └ other shared chunks (total) 13.5 kB ○ (Static) prerendered as static content ƒ (Dynamic) server-rendered on demand ``` Fixes https://github.com/vercel/next.js/issues/76507 Closes NAR-194 --------- Co-authored-by: Wyatt Johnson <accounts+github@wyattjoh.ca>
Author
Parents
Loading