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
7a53950c
Unverified
Commit
7a53950c
authored
Sep 17, 2025
by
Niklas Mischkulnig
Committed by
GitHub
Sep 17, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[backport] Turbopack: don't treat metadata routes as RSC (#83804)
parent
050bdf1a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
7 deletions
+44
-7
app.rs
crates/next-api/src/app.rs
+3
-7
route.js
test/e2e/app-dir/dynamic/app/api/route.js
+5
-0
client-reference.js
test/e2e/app-dir/dynamic/app/client-reference.js
+5
-0
dynamic-component.js
test/e2e/app-dir/dynamic/app/dynamic-component.js
+7
-0
sitemap.js
test/e2e/app-dir/dynamic/app/sitemap.js
+14
-0
dynamic.test.ts
test/e2e/app-dir/dynamic/dynamic.test.ts
+10
-0
No files found.
crates/next-api/src/app.rs
View file @
7a53950c
...
@@ -1133,8 +1133,8 @@ impl AppEndpoint {
...
@@ -1133,8 +1133,8 @@ impl AppEndpoint {
next_config
:
Vc
<
NextConfig
>
,
next_config
:
Vc
<
NextConfig
>
,
)
->
Result
<
Vc
<
AppEntry
>>
{
)
->
Result
<
Vc
<
AppEntry
>>
{
Ok
(
get_app_metadata_route_entry
(
Ok
(
get_app_metadata_route_entry
(
self
.app_project
.r
sc
_module_context
(),
self
.app_project
.r
oute
_module_context
(),
self
.app_project
.edge_r
sc
_module_context
(),
self
.app_project
.edge_r
oute
_module_context
(),
self
.app_project
.project
()
.project_path
()
.owned
()
.await
?
,
self
.app_project
.project
()
.project_path
()
.owned
()
.await
?
,
self
.page
.clone
(),
self
.page
.clone
(),
*
self
.app_project
.project
()
.next_mode
()
.await
?
,
*
self
.app_project
.project
()
.next_mode
()
.await
?
,
...
@@ -1193,11 +1193,7 @@ impl AppEndpoint {
...
@@ -1193,11 +1193,7 @@ impl AppEndpoint {
AppEndpointType
::
Metadata
{
metadata
}
=>
(
AppEndpointType
::
Metadata
{
metadata
}
=>
(
false
,
false
,
false
,
false
,
if
matches!
(
metadata
,
MetadataItem
::
Dynamic
{
..
})
{
EmitManifests
::
Minimal
,
EmitManifests
::
Full
}
else
{
EmitManifests
::
Minimal
},
matches!
(
metadata
,
MetadataItem
::
Dynamic
{
..
}),
matches!
(
metadata
,
MetadataItem
::
Dynamic
{
..
}),
),
),
};
};
...
...
test/e2e/app-dir/dynamic/app/api/route.js
0 → 100644
View file @
7a53950c
import
{
DynamicComponent
}
from
'../client-reference'
export
async
function
GET
()
{
return
new
Response
(
'Hello '
+
typeof
DynamicComponent
)
}
test/e2e/app-dir/dynamic/app/client-reference.js
0 → 100644
View file @
7a53950c
'use client'
import
dynamic
from
'next/dynamic'
export
const
DynamicComponent
=
dynamic
(()
=>
import
(
'./dynamic-component'
))
test/e2e/app-dir/dynamic/app/dynamic-component.js
0 → 100644
View file @
7a53950c
const
DynamicImportComponent
=
()
=>
{
return
(
<
div
id
=
"dynamic-component"
>
This
is
a
dynamically
imported
component
<
/div
>
)
}
export
default
DynamicImportComponent
test/e2e/app-dir/dynamic/app/sitemap.js
0 → 100644
View file @
7a53950c
import
{
DynamicComponent
}
from
'./client-reference'
globalThis
.
foo
=
DynamicComponent
export
default
function
sitemap
()
{
return
[
{
url
:
'https://acme.com'
,
lastModified
:
new
Date
(),
changeFrequency
:
'yearly'
,
priority
:
1
,
},
]
}
test/e2e/app-dir/dynamic/dynamic.test.ts
View file @
7a53950c
...
@@ -64,6 +64,16 @@ describe('app dir - next/dynamic', () => {
...
@@ -64,6 +64,16 @@ describe('app dir - next/dynamic', () => {
expect
(
$
(
'#dynamic-component'
).
text
()).
not
.
toContain
(
'loading'
)
expect
(
$
(
'#dynamic-component'
).
text
()).
not
.
toContain
(
'loading'
)
})
})
it
(
'should ignore next/dynamic in routes'
,
async
()
=>
{
const
response
=
await
next
.
fetch
(
'/api'
)
expect
(
await
response
.
text
()).
toEqual
(
'Hello function'
)
})
it
(
'should ignore next/dynamic in sitemap'
,
async
()
=>
{
const
response
=
await
next
.
fetch
(
'/sitemap.xml'
)
expect
(
await
response
.
text
()).
toInclude
(
'<changefreq>yearly</changefreq>'
)
})
if
(
isNextDev
)
{
if
(
isNextDev
)
{
it
(
'should directly raise error when dynamic component error on server'
,
async
()
=>
{
it
(
'should directly raise error when dynamic component error on server'
,
async
()
=>
{
const
pagePath
=
'app/default-loading/dynamic-component.js'
const
pagePath
=
'app/default-loading/dynamic-component.js'
...
...
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