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
c4f43e45
Commit
c4f43e45
authored
Aug 14, 2025
by
Tobias Koppers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: add resolve_export property to ChunkingType
parent
ec4c08a8
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
32 additions
and
2 deletions
+32
-2
hmr_entry.rs
crates/next-core/src/hmr_entry.rs
+1
-0
mod.rs
turbopack/crates/turbopack-core/src/chunk/mod.rs
+11
-2
mod.rs
turbopack/crates/turbopack-core/src/module_graph/mod.rs
+1
-0
module_batches.rs
.../crates/turbopack-core/src/module_graph/module_batches.rs
+3
-0
mod.rs
turbopack/crates/turbopack-core/src/reference/mod.rs
+1
-0
compose.rs
turbopack/crates/turbopack-css/src/references/compose.rs
+1
-0
import.rs
turbopack/crates/turbopack-css/src/references/import.rs
+1
-0
internal.rs
turbopack/crates/turbopack-css/src/references/internal.rs
+1
-0
url.rs
turbopack/crates/turbopack-css/src/references/url.rs
+1
-0
amd.rs
turbopack/crates/turbopack-ecmascript/src/references/amd.rs
+1
-0
cjs.rs
turbopack/crates/turbopack-ecmascript/src/references/cjs.rs
+3
-0
base.rs
...ck/crates/turbopack-ecmascript/src/references/esm/base.rs
+2
-0
url.rs
...ack/crates/turbopack-ecmascript/src/references/esm/url.rs
+1
-0
require_context.rs
...es/turbopack-ecmascript/src/references/require_context.rs
+2
-0
worker.rs
...pack/crates/turbopack-ecmascript/src/references/worker.rs
+1
-0
reference.rs
...pack-ecmascript/src/side_effect_optimization/reference.rs
+1
-0
No files found.
crates/next-core/src/hmr_entry.rs
View file @
c4f43e45
...
...
@@ -153,6 +153,7 @@ impl ModuleReference for HmrEntryModuleReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-core/src/chunk/mod.rs
View file @
c4f43e45
...
...
@@ -264,6 +264,8 @@ pub enum ChunkingType {
/// Whether the referenced module is executed always immediately before the parent module
/// (corresponding to ESM import semantics).
hoisted
:
bool
,
/// Resolve the specified export to get the inner modules.
resolve_export
:
Option
<
RcStr
>
,
},
/// An async loader is placed into the referencing chunk and loads the
/// separate chunk group in which the module is placed.
...
...
@@ -292,10 +294,12 @@ impl Display for ChunkingType {
ChunkingType
::
Parallel
{
inherit_async
,
hoisted
,
resolve_export
,
}
=>
{
write!
(
f
,
"Parallel(inherit_async: {inherit_async}, hoisted: {hoisted})"
,
"Parallel(inherit_async: {inherit_async}, hoisted: {hoisted}, resolve_export:
\
{resolve_export:?})"
,
)
}
ChunkingType
::
Async
=>
write!
(
f
,
"Async"
),
...
...
@@ -364,9 +368,14 @@ impl ChunkingType {
pub
fn
without_inherit_async
(
&
self
)
->
Self
{
match
self
{
ChunkingType
::
Parallel
{
hoisted
,
..
}
=>
ChunkingType
::
Parallel
{
ChunkingType
::
Parallel
{
hoisted
,
resolve_export
,
..
}
=>
ChunkingType
::
Parallel
{
hoisted
:
*
hoisted
,
inherit_async
:
false
,
resolve_export
:
resolve_export
.clone
(),
},
ChunkingType
::
Async
=>
ChunkingType
::
Async
,
ChunkingType
::
Isolated
{
_ty
,
merge_tag
}
=>
ChunkingType
::
Isolated
{
...
...
turbopack/crates/turbopack-core/src/module_graph/mod.rs
View file @
c4f43e45
...
...
@@ -1672,6 +1672,7 @@ impl Visit<SingleModuleGraphBuilderNode, RefData> for SingleModuleGraphBuilder<'
ChunkingType
::
Parallel
{
inherit_async
:
_
,
hoisted
:
_
,
resolve_export
:
_
,
}
=>
{}
ChunkingType
::
Traced
=>
{
let
_span
=
span
.entered
();
...
...
turbopack/crates/turbopack-core/src/module_graph/module_batches.rs
View file @
c4f43e45
...
...
@@ -296,6 +296,7 @@ impl PreBatches {
&
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
},
|(
_
,
ty
)|
&
ty
.chunking_type
,
);
...
...
@@ -682,6 +683,7 @@ pub async fn compute_module_batches(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
},
module
,
)
...
...
@@ -843,6 +845,7 @@ pub async fn compute_module_batches(
ty
:
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
},
module
:
None
,
},
...
...
turbopack/crates/turbopack-core/src/reference/mod.rs
View file @
c4f43e45
...
...
@@ -132,6 +132,7 @@ impl ModuleReference for SingleChunkableModuleReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
true
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
...
...
turbopack/crates/turbopack-css/src/references/compose.rs
View file @
c4f43e45
...
...
@@ -48,6 +48,7 @@ impl ModuleReference for CssModuleComposeReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-css/src/references/import.rs
View file @
c4f43e45
...
...
@@ -147,6 +147,7 @@ impl ModuleReference for ImportAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-css/src/references/internal.rs
View file @
c4f43e45
...
...
@@ -36,6 +36,7 @@ impl ModuleReference for InternalCssAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-css/src/references/url.rs
View file @
c4f43e45
...
...
@@ -90,6 +90,7 @@ impl ModuleReference for UrlAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-ecmascript/src/references/amd.rs
View file @
c4f43e45
...
...
@@ -79,6 +79,7 @@ impl ModuleReference for AmdDefineAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-ecmascript/src/references/cjs.rs
View file @
c4f43e45
...
...
@@ -73,6 +73,7 @@ impl ModuleReference for CjsAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
@@ -130,6 +131,7 @@ impl ModuleReference for CjsRequireAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
@@ -262,6 +264,7 @@ impl ModuleReference for CjsRequireResolveAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-ecmascript/src/references/esm/base.rs
View file @
c4f43e45
...
...
@@ -516,6 +516,7 @@ impl ModuleReference for EsmAssetReference {
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
true
,
hoisted
:
true
,
resolve_export
:
None
,
})
}
else
if
chunking_type
==
"none"
{
None
...
...
@@ -529,6 +530,7 @@ impl ModuleReference for EsmAssetReference {
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
true
,
hoisted
:
true
,
resolve_export
:
None
,
})
},
))
...
...
turbopack/crates/turbopack-ecmascript/src/references/esm/url.rs
View file @
c4f43e45
...
...
@@ -103,6 +103,7 @@ impl ModuleReference for UrlAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-ecmascript/src/references/require_context.rs
View file @
c4f43e45
...
...
@@ -292,6 +292,7 @@ impl ModuleReference for RequireContextAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
@@ -383,6 +384,7 @@ impl ModuleReference for ResolvedModuleReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-ecmascript/src/references/worker.rs
View file @
c4f43e45
...
...
@@ -261,6 +261,7 @@ impl ModuleReference for WorkerAssetReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
false
,
hoisted
:
false
,
resolve_export
:
None
,
}))
}
}
...
...
turbopack/crates/turbopack-ecmascript/src/side_effect_optimization/reference.rs
View file @
c4f43e45
...
...
@@ -139,6 +139,7 @@ impl ModuleReference for EcmascriptModulePartReference {
Vc
::
cell
(
Some
(
ChunkingType
::
Parallel
{
inherit_async
:
true
,
hoisted
:
true
,
resolve_export
:
None
,
}))
}
...
...
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