Allow "edge" as a runtime for pages in the Pages Router #65948
Closed
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.
What?
Currently pages on the Pages Router only accept "experimental-edge", not "edge". If you use "edge", there will be a build error.
This is contrary to the documentation, which states
This PR allows "edge" to be used as the runtime for Pages Router pages.
Why?
Either the documentation is wrong, or the "edge" check should be removed. Since in #50701, the
// or "edge"
phrase was explicitly added to that part, I suppose the team decided already to fully stabilise the edge runtime everywhere, so I decided to make the PR to remove the "edge" check.If the documentation is wrong and the edge runtime should still be marked as experimental, feel free to close this PR but please also update the documentation in that case.
How?
I simply removed the "edge" checks. Using "experimental-edge" in pages should now result in a warning but things should still work (same as Edge API Routes).
Fixes #65945