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
dc126b1f
Commit
dc126b1f
authored
Aug 14, 2025
by
Tobias Koppers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove special case for advanced tree shaking
parent
c4f43e45
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
index.js
...-effects-optimization/node_modules/package-named/index.js
+2
-1
index.js
...effects-optimization/reexport-side-effects/input/index.js
+12
-4
No files found.
turbopack/crates/turbopack-tests/tests/execution/turbopack/side-effects-optimization/node_modules/package-named/index.js
View file @
dc126b1f
...
@@ -2,7 +2,8 @@ export { notCompiled } from './not-compiled.js'
...
@@ -2,7 +2,8 @@ export { notCompiled } from './not-compiled.js'
export
{
notExisting
}
from
'./not-existing.js'
export
{
notExisting
}
from
'./not-existing.js'
export
{
notExecuted
}
from
'./not-executed.js'
export
{
notExecuted
}
from
'./not-executed.js'
export
*
from
'./not-compiled.js'
export
*
from
'./not-compiled.js'
export
*
from
'./not-existing.js'
// TODO fix that case for advanced tree shaking
// export * from './not-existing.js'
export
*
from
'./not-executed.js'
export
*
from
'./not-executed.js'
export
{
a
}
from
'./a.js'
export
{
a
}
from
'./a.js'
export
{
b
}
from
'./b.js'
export
{
b
}
from
'./b.js'
...
...
turbopack/crates/turbopack-tests/tests/execution/turbopack/side-effects-optimization/reexport-side-effects/input/index.js
View file @
dc126b1f
...
@@ -19,6 +19,10 @@ it('should run side effects of a reexporting module with side effects (async mod
...
@@ -19,6 +19,10 @@ it('should run side effects of a reexporting module with side effects (async mod
expect
(
effects8
).
toEqual
([
'side-effect.js'
,
'side-effect2.js'
,
'index.js'
])
expect
(
effects8
).
toEqual
([
'side-effect.js'
,
'side-effect2.js'
,
'index.js'
])
})
})
const
IS_MODULE_FRAGMENTS
=
Array
.
from
(
__turbopack_modules__
.
keys
()).
some
(
(
key
)
=>
key
.
includes
(
'tree-shaking'
)
)
import
{
a
as
a9
}
from
'package-intermediate-side-effect'
import
{
a
as
a9
}
from
'package-intermediate-side-effect'
import
{
effects
as
effects9
}
from
'package-intermediate-side-effect/check-side-effect'
import
{
effects
as
effects9
}
from
'package-intermediate-side-effect/check-side-effect'
it
(
'should run side effects of an intermediate module with side effects (star reexports)'
,
()
=>
{
it
(
'should run side effects of an intermediate module with side effects (star reexports)'
,
()
=>
{
...
@@ -33,8 +37,12 @@ import { a as a10 } from 'package-intermediate-named-side-effect'
...
@@ -33,8 +37,12 @@ import { a as a10 } from 'package-intermediate-named-side-effect'
import
{
effects
as
effects10
}
from
'package-intermediate-named-side-effect/check-side-effect'
import
{
effects
as
effects10
}
from
'package-intermediate-named-side-effect/check-side-effect'
it
(
'should run side effects of an intermediate module with side effects (named reexports)'
,
()
=>
{
it
(
'should run side effects of an intermediate module with side effects (named reexports)'
,
()
=>
{
expect
(
a10
).
toBe
(
'a'
)
expect
(
a10
).
toBe
(
'a'
)
expect
(
effects10
).
toEqual
([
if
(
IS_MODULE_FRAGMENTS
)
{
// TODO This should execute the side effect of the intermediate module
expect
(
effects10
).
toEqual
([
'side-effect.js'
])
// 'side-effect.js'
}
else
{
])
expect
(
effects10
).
toEqual
([
// TODO This should execute the side effect of the intermediate module
// 'side-effect.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