fix: correct handling of data route JSON files #864
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently, the JSON files for statically-rendered routes were not being moved into the correct location for loading from the CDN. This PR moves them into
_next/data/build-id/
, rather than alongside the HTML.It also fixes a bug in the fielsystem patching funcitons that load missing files from the CDN when required by Next. They were failing because even though they downloaded properly, Next would run
stat()
which would fail.This adds lots of links to the test site index page, so that we can load all the different sorts of test page.
Test plan
x-render-mode
, meaning that it was served from the CDN.Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Standard checks:
🧪 Once merged, make sure to update the version if needed and that it was published correctly.