-
Notifications
You must be signed in to change notification settings - Fork 26k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(next-core): allow runtime segment option in pages/api #58409
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kwonoj
requested review from
timneutkens,
ijjk,
shuding,
huozhi and
a team
as code owners
November 13, 2023 23:41
kwonoj
force-pushed
the
middleware-mutate
branch
from
November 14, 2023 00:10
1398eee
to
652af0b
Compare
kwonoj
force-pushed
the
middleware-mutate
branch
from
November 14, 2023 16:38
f357042
to
23d534b
Compare
Tests Passed |
ijjk
added
area: tests
Turbopack
Related to Turbopack with Next.js.
created-by: Turbopack team
PRs by the turbopack team
type: next
labels
Nov 14, 2023
kwonoj
force-pushed
the
middleware-mutate
branch
from
November 14, 2023 19:29
23d534b
to
8086ebf
Compare
Stats from current PRDefault BuildGeneral
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes
|
sokra
approved these changes
Nov 17, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
created-by: Turbopack team
PRs by the turbopack team
locked
Turbopack
Related to Turbopack with Next.js.
type: next
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
This PR fixes turbopack to allow runtime segment option (https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes#segment-runtime-Option) in pages/api.
Previously it only allows config object (https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher), so the single runtime export like
export const runtime = 'edge'
didn't work. PR updates logic to parse config in the module to allow single segment export as well.It doesn't allow both, if config object is exported it'll short-curcuit to read values as config object should able to specify runtime without separate runtime segment.
Closes PACK-1961