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
33efdc2d
Unverified
Commit
33efdc2d
authored
Oct 26, 2026
by
vercel-fleet-prod[bot]
Committed by
GitHub
Oct 26, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep markers for inlined export values
Co-authored-by:
Tobias Koppers
<
1365881+sokra@users.noreply.github.com
>
parent
1d0ed883
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
mod.rs
turbopack/crates/turbopack-ecmascript/src/references/mod.rs
+1
-1
index.js
.../optimization/codegen-inline-exports-cycle/input/index.js
+2
-2
index.js
...zation/codegen-inline-exports-interactions/input/index.js
+4
-2
index.js
...bopack/optimization/codegen-inline-exports/input/index.js
+1
-1
No files found.
turbopack/crates/turbopack-ecmascript/src/references/mod.rs
View file @
33efdc2d
...
...
@@ -1485,7 +1485,7 @@ async fn analyze_ecmascript_module_internal(
.get_inline_export
(
esm_reference_index
,
export
.clone
())
.await
?
{
analysis
.add_code_gen
(
ConstantValueCodeGen
::
new
_inline_export
(
analysis
.add_code_gen
(
ConstantValueCodeGen
::
new
(
c
,
analysis
.intern_path
(
&
ast_path
),
));
...
...
turbopack/crates/turbopack-tests/tests/execution/turbopack/optimization/codegen-inline-exports-cycle/input/index.js
View file @
33efdc2d
...
...
@@ -5,8 +5,8 @@ it('inlines across an import cycle without retaining the constants module', () =
const
source
=
readA
.
toString
()
expect
(
source
).
toContain
(
'"a"'
)
expect
(
source
).
not
.
toContain
(
'TURBOPACK compile-time value'
)
expect
(
source
).
not
.
toContain
(
'value'
)
expect
(
source
).
toContain
(
'TURBOPACK compile-time value'
)
expect
(
source
).
not
.
toContain
(
'
return
value'
)
const
modules
=
Array
.
from
(
__turbopack_modules__
.
keys
())
expect
(
modules
).
toContainEqual
(
expect
.
stringMatching
(
/input
\/
b
\.
js/
))
...
...
turbopack/crates/turbopack-tests/tests/execution/turbopack/optimization/codegen-inline-exports-interactions/input/index.js
View file @
33efdc2d
...
...
@@ -25,7 +25,7 @@ it('preserves analyzer-aware precedence and falls back to codegen-only inlining'
expect
(
readAnnotationOff
()).
toBe
(
'off'
)
expect
(
readAnalyzed
.
toString
()).
toContain
(
'TURBOPACK compile-time value'
)
expect
(
readLate
.
toString
()).
not
.
toContain
(
'TURBOPACK compile-time value'
)
expect
(
readLate
.
toString
()).
toContain
(
'TURBOPACK compile-time value'
)
expect
(
readLate
.
toString
()).
not
.
toContain
(
'late'
)
expect
(
readAnnotationOff
.
toString
()).
not
.
toContain
(
'annotationOff'
)
...
...
@@ -36,7 +36,9 @@ it('preserves analyzer-aware precedence and falls back to codegen-only inlining'
expect
(
modules
).
not
.
toContainEqual
(
expect
.
stringMatching
(
/input
\/
forced-marker
\.
js/
)
)
expect
(
modules
).
toContainEqual
(
expect
.
stringMatching
(
/input
\/
late-marker
\.
js/
))
expect
(
modules
).
toContainEqual
(
expect
.
stringMatching
(
/input
\/
late-marker
\.
js/
)
)
expect
(
modules
).
toContainEqual
(
expect
.
stringMatching
(
/input
\/
annotation-off-marker
\.
js/
)
)
...
...
turbopack/crates/turbopack-tests/tests/execution/turbopack/optimization/codegen-inline-exports/input/index.js
View file @
33efdc2d
...
...
@@ -75,7 +75,7 @@ it('inlines short primitive exports during code generation', () => {
expect
(
source
).
toContain
(
'false'
)
expect
(
source
).
toContain
(
'null'
)
expect
(
source
).
toContain
(
'void 0'
)
expect
(
source
).
not
.
toContain
(
'TURBOPACK compile-time value'
)
expect
(
source
).
toContain
(
'TURBOPACK compile-time value'
)
expect
(
source
).
not
.
toContain
(
'shortString'
)
expect
(
source
).
not
.
toContain
(
'smallNumber'
)
expect
(
readStaticNamespace
.
toString
()).
not
.
toContain
(
'staticNamespace'
)
...
...
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