-
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(nuxt): only fetch payloads for prerendered routes #7805
Conversation
Β Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
β Deploy Preview for nuxt3-docs canceled.
|
5e726ed
to
109922e
Compare
@pi0 How can I help on this? What's the reason this is marked as draft/pending? |
π |
@pi0 Would you let me know why you have marked this as a draft/pending? There are some changes that I would like to make to update this to use the route rules that were implemented after this was opened, but I'm currently waiting to hear back from you on this. |
Having a But I'm against adding every prerendered route to a single manifest file, is not good for performance and not scalable for any real-world project with dozens of routes. (instead we should keep route rules that predict prerendering possibility and check them with radix3 utils)
|
On board with So, just to understand the situation with :full static mode - you're saying that from your point of view, 404s are an inevitable evil, with two possible mitigations: We can (1) prevent fetching them if there is a |
Are there any updates on if/when this, or a solution to solve this problem will be completed? Currently having this issue in production where payloads for non prerendered routes are being requested resulting in a 404 which is not ideal. |
π Linked issue
nuxt/nuxt#14507
resolves nuxt/nuxt#15024
β Type of change
π Description
This PR adds support for an app manifest (at
/manifest.json
) which contains, at the moment, simply a list of routes for which there are corresponding payloads. With the implementation of route rules this manifest can be extended/modified. In addition, it can be extended with a build hash to allow version change detection.With this PR:
experimental.payloadExtraction
is set by the user totrue
(there are more edge cases, such as CORS, with client-side fetching, so I felt it was better to set default to false in dev mode so user handles them properly, in case they are not prerendering all their pages).(Note, @pi0, I'm also happy to go ahead and implement route rules, but thought we could adopt this approach for now and modify it at that point.)
π Checklist