Prerender static routes in Nuxt #5195
Labels
💻 aspect: code
Concerns the software code in the repository
✨ goal: improvement
Improvement to an existing user-facing feature
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
Problem
Currently, the Nuxt app generates every page requested. Some pages (such as
/about
) are static and don't change between requests or based on the query parameters, so generating them unnecessarily taxes the CPU.Description
Use Nuxt's Hybrid rendering to pre-render the static pages during the build time.
This is slightly complicated because the routes have locale prefixes, so we need to list all routes for all locales.
Alternatives
Keep using the CPU for all routes. I'm not sure how much of an improvement to the performance this change would bring, so it would be important to monitor the CPU/memory performance after merging it.
Additional context
The CPU is the bottleneck when we run the load tests in staging, and this might improve the performance in those tests.
The text was updated successfully, but these errors were encountered: