Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(turbopack): Fix tree shaking with
import * as R
#74725fix(turbopack): Fix tree shaking with
import * as R
#74725Changes from 34 commits
9e37ce2
19c02f9
31ba1d3
5e4ef95
0fadca5
bd52c66
104f0d6
78d6bbc
0f55020
f1e9cb0
3a3ca98
8fc6664
186648a
53d652b
511cdf2
c208b3b
3ed348c
791f674
58595c4
e87f367
c18824b
b489f16
c127e81
3b46d42
2bfaca1
9865c46
be973cd
c845528
2d63498
f7fa8b8
e456bd4
2b6064a
35f7d12
7bbf5c0
f2bec0b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only in this mode? Wouldn't this also be benefitial even when splitting into fragments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will go to a different code path, namely
follow_reexports_with_side_effects
.next.js/turbopack/crates/turbopack-ecmascript/src/tree_shake/asset.rs
Lines 219 to 268 in d0d7352
In the full module fragment tree shaking mode
import *
will not createNone
forOption<ModulePart>
. The line producingNone
is located atnext.js/turbopack/crates/turbopack-ecmascript/src/references/mod.rs
Line 633 in d0d7352
ReexportsOnly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I don't think we have a test for the other tree shaking mode though. Could you add that, seems like we already have something similar going on for
mui-utils
which runs the same code fromside-effects-optimization/mui-utils
but just with a different configSome generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.