fix: not all pages are pre-rendered #5475
Merged
FatahChan(GitHub profile, opens in a new tab)merged 38 commits into
main fromrefs/pull/5475/head·merged by schiller-manuel(GitHub profile, opens in a new tab) Showing 14 changed files with 65 additions and 5 deletions (loading 11).
x
30 additions and 2 deletions+30-2docs/start/framework/react/guide/static-prerendering.mdModifiedView file
@@ -25,6 +25,9 @@
+ // If disabled, only the root path or the paths defined in the pages config will be prerendered
+ autoStaticPathsDiscovery: true,
+
@@ -40,13 +43,20 @@
+ // Maximum number of redirects to follow during prerendering
+ maxRedirects: 5,
+
+ // Fail if an error occurs during prerendering
+ failOnError: true,
+
⚠️ Potential issue | 🔴 Critical
Missing comma before onSuccess makes the example invalid.
This is a syntax error in the object literal; add a trailing comma.
- // Fail if an error occurs during prerendering
- failOnError: true
+ // Fail if an error occurs during prerendering
+ failOnError: true,
📝 Committable suggestion
‼️ IMPORTANT Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// Maximum number of redirects to follow during prerendering
maxRedirect: 5,
// Fail if an error occurs during prerendering
failOnError: true,
🤖 Prompt for AI Agents
In docs/start/framework/react/guide/static-prerendering.md around lines 46 to
51, the object literal is missing a trailing comma after the failOnError
property which makes the subsequent onSuccess entry a syntax error; add a comma
after "failOnError: true" so the object is valid (i.e., ensure the property list
uses commas between entries).
✅ Addressed in commit 48bb746