HHS / simpler-grants-gov

https://simpler.grants.gov
Other
29 stars 9 forks source link

[WIP] Static render pages #2016

Closed acouch closed 2 weeks ago

acouch commented 2 weeks ago

Summary

Fixes #{ISSUE}

Time to review: x mins

Changes proposed

Statically render pages so that we aren't rerendering each page request for static content.

Route (app)                               Size     First Load JS
┌ ○ /_not-found                           144 B          87.1 kB
├ ● /[locale]                             294 B           162 kB
├   ├ /en
├   └ /es
├ ● /[locale]/dev/feature-flags           1.99 kB         156 kB
├   ├ /en/dev/feature-flags
├   └ /es/dev/feature-flags
├ ● /[locale]/health                      144 B          87.1 kB
├   ├ /en/health
├   └ /es/health
├ ● /[locale]/newsletter                  1.52 kB         171 kB
├   ├ /en/newsletter
├   └ /es/newsletter
├ ● /[locale]/newsletter/confirmation     198 B           161 kB
├   ├ /en/newsletter/confirmation
├   └ /es/newsletter/confirmation
├ ● /[locale]/newsletter/unsubscribe      198 B           161 kB
├   ├ /en/newsletter/unsubscribe
├   └ /es/newsletter/unsubscribe
├ ● /[locale]/process                     294 B           162 kB
├   ├ /en/process
├   └ /es/process
├ ● /[locale]/research                    419 B           167 kB
├   ├ /en/research
├   └ /es/research
└ ● /[locale]/search                      3.69 kB         170 kB
    ├ /en/search
    └ /es/search
+ First Load JS shared by all             87 kB
  ├ chunks/23-fcb2a4b11f051986.js         31.5 kB
  ├ chunks/fd9d1056-682491d09bf4394b.js   53.6 kB
  └ other shared chunks (total)           1.9 kB

Route (pages)                             Size     First Load JS
─ ƒ /api/subscribe                        0 B            79.2 kB
+ First Load JS shared by all             79.2 kB
  ├ chunks/framework-f66176bb897dc684.js  45.2 kB
  ├ chunks/main-5c9d047aa7582e14.js       32.2 kB
  └ other shared chunks (total)           1.87 kB

ƒ Middleware                              33.2 kB

○  (Static)   prerendered as static content
●  (SSG)      prerendered as static HTML (uses getStaticProps)
ƒ  (Dynamic)  server-rendered on demand

Need to re-add the template.tsx and other cleanup.

Context for reviewers

Additional information