Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
087b04dc
Commit
087b04dc
authored
Oct 07, 2025
by
Benjamin Woodruff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Add `runtime` field to `MiddlewareConfig` type
parent
d796c0f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
middleware-config.ts
.../src/build/segment-config/middleware/middleware-config.ts
+6
-1
No files found.
packages/next/src/build/segment-config/middleware/middleware-config.ts
View file @
087b04dc
import
picomatch
from
'next/dist/compiled/picomatch'
import
picomatch
from
'next/dist/compiled/picomatch'
import
{
z
}
from
'next/dist/compiled/zod'
import
{
z
}
from
'next/dist/compiled/zod'
import
type
zod
from
'next/dist/compiled/zod'
import
{
tryToParsePath
}
from
'../../../lib/try-to-parse-path'
import
{
tryToParsePath
}
from
'../../../lib/try-to-parse-path'
import
type
{
RouteHas
}
from
'../../../lib/load-custom-routes'
import
type
{
RouteHas
}
from
'../../../lib/load-custom-routes'
...
@@ -108,7 +109,9 @@ export const MiddlewareConfigInputSchema = z.object({
...
@@ -108,7 +109,9 @@ export const MiddlewareConfigInputSchema = z.object({
* files. The globs are relative to your application root folder.
* files. The globs are relative to your application root folder.
*/
*/
unstable_allowDynamic
:
z
.
union
([
GlobSchema
,
z
.
array
(
GlobSchema
)]).
optional
(),
unstable_allowDynamic
:
z
.
union
([
GlobSchema
,
z
.
array
(
GlobSchema
)]).
optional
(),
})
runtime
:
z
.
union
([
z
.
literal
(
'nodejs'
),
z
.
literal
(
'edge'
)]),
})
satisfies
zod
.
ZodType
<
MiddlewareConfigInput
>
export
type
MiddlewareConfigInput
=
{
export
type
MiddlewareConfigInput
=
{
/**
/**
...
@@ -136,6 +139,8 @@ export type MiddlewareConfigInput = {
...
@@ -136,6 +139,8 @@ export type MiddlewareConfigInput = {
* files. The globs are relative to your application root folder.
* files. The globs are relative to your application root folder.
*/
*/
unstable_allowDynamic
?:
string
|
string
[]
unstable_allowDynamic
?:
string
|
string
[]
runtime
?:
'nodejs'
|
'edge'
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment